diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-11-06 13:48:24 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-06 23:20:47 +0100 |
commit | 47cb2ed9df2789fc4a3fe1201e475078f93c4839 (patch) | |
tree | 5d2bc2cdc63496d8b073eeea09d939b900129a46 /arch/x86 | |
parent | 8d00450d296dedec9ada38d43b83e79cca6fd5a3 (diff) | |
download | linux-47cb2ed9df2789fc4a3fe1201e475078f93c4839.tar.gz linux-47cb2ed9df2789fc4a3fe1201e475078f93c4839.tar.bz2 linux-47cb2ed9df2789fc4a3fe1201e475078f93c4839.zip |
x86, xen: fix use of pgd_page now that it really does return a page
Impact: fix 32-bit Xen guest boot crash
On 32-bit PAE, pud_page, for no good reason, didn't really return a
struct page *. Since Jan Beulich's fix "i386/PAE: fix pud_page()",
pud_page does return a struct page *.
Because PAE has 3 pagetable levels, the pud level is folded into the
pgd level, so pgd_page() is the same as pud_page(), and now returns
a struct page *. Update the xen/mmu.c code which uses pgd_page()
accordingly.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/xen/mmu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index aba77b2b7d18..49697d86c6a5 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -874,7 +874,7 @@ static void __xen_pgd_pin(struct mm_struct *mm, pgd_t *pgd) #else /* CONFIG_X86_32 */ #ifdef CONFIG_X86_PAE /* Need to make sure unshared kernel PMD is pinnable */ - xen_pin_page(mm, virt_to_page(pgd_page(pgd[pgd_index(TASK_SIZE)])), + xen_pin_page(mm, pgd_page(pgd[pgd_index(TASK_SIZE)]), PT_PMD); #endif xen_do_pin(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(pgd))); @@ -991,7 +991,7 @@ static void __xen_pgd_unpin(struct mm_struct *mm, pgd_t *pgd) #ifdef CONFIG_X86_PAE /* Need to make sure unshared kernel PMD is unpinned */ - xen_unpin_page(mm, virt_to_page(pgd_page(pgd[pgd_index(TASK_SIZE)])), + xen_unpin_page(mm, pgd_page(pgd[pgd_index(TASK_SIZE)]), PT_PMD); #endif |