Re: [GIT PULL] x86/mm changes for v3.9-rc1

From: Yinghai Lu
Date: Fri Feb 22 2013 - 20:39:17 EST


[ trim cc list]

On Fri, Feb 22, 2013 at 5:27 PM, Konrad Rzeszutek Wilk
<konrad.wilk@xxxxxxxxxx> wrote:
>> > static int xen_pgd_alloc(struct mm_struct *mm)
>> > {
>> > pgd_t *pgd = mm->pgd;
>> > @@ -2105,7 +2143,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = {
>> > #ifdef CONFIG_X86_32
>> > .write_cr3 = xen_write_cr3_init,
>> > #else
>> > - .write_cr3 = xen_write_cr3,
>> > + .write_cr3 = xen_write_cr3_init,
>> > #endif
>>
>> ah, why do you still keep the #ifdef here?
>>
>> how about if we call load_cr3 early several times?
>> assume you should make xen_write_cr3 more robust,
>> like bailing out early when cr3 writing same value.
>
> I would welcome such patch - but at this point I just want a
> patch for Linus so that I am not blocking him - and this
> one works.

come on, you produce

#ifdef CONFIG_X86_32
.write_cr3 = xen_write_cr3_init,
#else
.write_cr3 = xen_write_cr3_init,
#endif

for the fix, Linus should just apply attached patch instead.

>>
>> Also you should check condition about calling xen_get_user_pgd().
>
> Could you elaborate please?

only call xen_get_user_pgd() when it should be called.

Yinghai

Attachment: fix_xen_cr3.patch
Description: Binary data