Commit b1992df3 authored by Jan Beulich's avatar Jan Beulich Committed by Thomas Gleixner

x86: honor _PAGE_PSE bit on page walks

[ tglx: arch/x86 adaptation ]
Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 1f503e77
...@@ -564,7 +564,8 @@ no_context: ...@@ -564,7 +564,8 @@ no_context:
* it's allocated already. * it's allocated already.
*/ */
if ((page >> PAGE_SHIFT) < max_low_pfn if ((page >> PAGE_SHIFT) < max_low_pfn
&& (page & _PAGE_PRESENT)) { && (page & _PAGE_PRESENT)
&& !(page & _PAGE_PSE)) {
page &= PAGE_MASK; page &= PAGE_MASK;
page = ((__typeof__(page) *) __va(page))[(address >> PAGE_SHIFT) page = ((__typeof__(page) *) __va(page))[(address >> PAGE_SHIFT)
& (PTRS_PER_PTE - 1)]; & (PTRS_PER_PTE - 1)];
......
...@@ -169,7 +169,7 @@ void dump_pagetable(unsigned long address) ...@@ -169,7 +169,7 @@ void dump_pagetable(unsigned long address)
pmd = pmd_offset(pud, address); pmd = pmd_offset(pud, address);
if (bad_address(pmd)) goto bad; if (bad_address(pmd)) goto bad;
printk("PMD %lx ", pmd_val(*pmd)); printk("PMD %lx ", pmd_val(*pmd));
if (!pmd_present(*pmd)) goto ret; if (!pmd_present(*pmd) || pmd_large(*pmd)) goto ret;
pte = pte_offset_kernel(pmd, address); pte = pte_offset_kernel(pmd, address);
if (bad_address(pte)) goto bad; if (bad_address(pte)) goto bad;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment