diff options
| -rw-r--r-- | arch/x86/xen/enlighten.c | 2 | ||||
| -rw-r--r-- | arch/x86/xen/mmu.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 7c44e1bf981e..4172af8ceeb3 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
| @@ -1141,7 +1141,9 @@ asmlinkage void __init xen_start_kernel(void) | |||
| 1141 | 1141 | ||
| 1142 | /* Prevent unwanted bits from being set in PTEs. */ | 1142 | /* Prevent unwanted bits from being set in PTEs. */ |
| 1143 | __supported_pte_mask &= ~_PAGE_GLOBAL; | 1143 | __supported_pte_mask &= ~_PAGE_GLOBAL; |
| 1144 | #if 0 | ||
| 1144 | if (!xen_initial_domain()) | 1145 | if (!xen_initial_domain()) |
| 1146 | #endif | ||
| 1145 | __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD); | 1147 | __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD); |
| 1146 | 1148 | ||
| 1147 | __supported_pte_mask |= _PAGE_IOMAP; | 1149 | __supported_pte_mask |= _PAGE_IOMAP; |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 58a0e46c404d..95c1cf60c669 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
| @@ -415,13 +415,13 @@ static pteval_t iomap_pte(pteval_t val) | |||
| 415 | static pteval_t xen_pte_val(pte_t pte) | 415 | static pteval_t xen_pte_val(pte_t pte) |
| 416 | { | 416 | { |
| 417 | pteval_t pteval = pte.pte; | 417 | pteval_t pteval = pte.pte; |
| 418 | 418 | #if 0 | |
| 419 | /* If this is a WC pte, convert back from Xen WC to Linux WC */ | 419 | /* If this is a WC pte, convert back from Xen WC to Linux WC */ |
| 420 | if ((pteval & (_PAGE_PAT | _PAGE_PCD | _PAGE_PWT)) == _PAGE_PAT) { | 420 | if ((pteval & (_PAGE_PAT | _PAGE_PCD | _PAGE_PWT)) == _PAGE_PAT) { |
| 421 | WARN_ON(!pat_enabled); | 421 | WARN_ON(!pat_enabled); |
| 422 | pteval = (pteval & ~_PAGE_PAT) | _PAGE_PWT; | 422 | pteval = (pteval & ~_PAGE_PAT) | _PAGE_PWT; |
| 423 | } | 423 | } |
| 424 | 424 | #endif | |
| 425 | if (xen_initial_domain() && (pteval & _PAGE_IOMAP)) | 425 | if (xen_initial_domain() && (pteval & _PAGE_IOMAP)) |
| 426 | return pteval; | 426 | return pteval; |
| 427 | 427 | ||
| @@ -463,7 +463,7 @@ void xen_set_pat(u64 pat) | |||
| 463 | static pte_t xen_make_pte(pteval_t pte) | 463 | static pte_t xen_make_pte(pteval_t pte) |
| 464 | { | 464 | { |
| 465 | phys_addr_t addr = (pte & PTE_PFN_MASK); | 465 | phys_addr_t addr = (pte & PTE_PFN_MASK); |
| 466 | 466 | #if 0 | |
| 467 | /* If Linux is trying to set a WC pte, then map to the Xen WC. | 467 | /* If Linux is trying to set a WC pte, then map to the Xen WC. |
| 468 | * If _PAGE_PAT is set, then it probably means it is really | 468 | * If _PAGE_PAT is set, then it probably means it is really |
| 469 | * _PAGE_PSE, so avoid fiddling with the PAT mapping and hope | 469 | * _PAGE_PSE, so avoid fiddling with the PAT mapping and hope |
| @@ -476,7 +476,7 @@ static pte_t xen_make_pte(pteval_t pte) | |||
| 476 | if ((pte & (_PAGE_PCD | _PAGE_PWT)) == _PAGE_PWT) | 476 | if ((pte & (_PAGE_PCD | _PAGE_PWT)) == _PAGE_PWT) |
| 477 | pte = (pte & ~(_PAGE_PCD | _PAGE_PWT)) | _PAGE_PAT; | 477 | pte = (pte & ~(_PAGE_PCD | _PAGE_PWT)) | _PAGE_PAT; |
| 478 | } | 478 | } |
| 479 | 479 | #endif | |
| 480 | /* | 480 | /* |
| 481 | * Unprivileged domains are allowed to do IOMAPpings for | 481 | * Unprivileged domains are allowed to do IOMAPpings for |
| 482 | * PCI passthrough, but not map ISA space. The ISA | 482 | * PCI passthrough, but not map ISA space. The ISA |
