diff options
Diffstat (limited to 'arch/x86/xen/mmu.c')
-rw-r--r-- | arch/x86/xen/mmu.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 3e9e095c295c..e6184735545f 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -241,8 +241,10 @@ unsigned long long xen_pgd_val(pgd_t pgd) | |||
241 | 241 | ||
242 | pte_t xen_make_pte(unsigned long long pte) | 242 | pte_t xen_make_pte(unsigned long long pte) |
243 | { | 243 | { |
244 | if (pte & 1) | 244 | if (pte & _PAGE_PRESENT) { |
245 | pte = phys_to_machine(XPADDR(pte)).maddr; | 245 | pte = phys_to_machine(XPADDR(pte)).maddr; |
246 | pte &= ~(_PAGE_PCD | _PAGE_PWT); | ||
247 | } | ||
246 | 248 | ||
247 | return (pte_t){ .pte = pte }; | 249 | return (pte_t){ .pte = pte }; |
248 | } | 250 | } |
@@ -288,10 +290,10 @@ unsigned long xen_pgd_val(pgd_t pgd) | |||
288 | 290 | ||
289 | pte_t xen_make_pte(unsigned long pte) | 291 | pte_t xen_make_pte(unsigned long pte) |
290 | { | 292 | { |
291 | if (pte & _PAGE_PRESENT) | 293 | if (pte & _PAGE_PRESENT) { |
292 | pte = phys_to_machine(XPADDR(pte)).maddr; | 294 | pte = phys_to_machine(XPADDR(pte)).maddr; |
293 | 295 | pte &= ~(_PAGE_PCD | _PAGE_PWT); | |
294 | pte &= ~(_PAGE_PCD | _PAGE_PWT); | 296 | } |
295 | 297 | ||
296 | return (pte_t){ pte }; | 298 | return (pte_t){ pte }; |
297 | } | 299 | } |