lkml.org 
[lkml]   [2008]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 10 of 10] xen: mask out PWT too
    Date
    From
    The hypervisor doesn't allow PCD or PWT to be set on guest ptes, so
    make sure they're masked out. Also, fix up some previous mispatching.

    Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>

    ---
    arch/x86/xen/mmu.c | 6 ++----
    1 file changed, 2 insertions(+), 4 deletions(-)

    diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
    --- a/arch/x86/xen/mmu.c
    +++ b/arch/x86/xen/mmu.c
    @@ -244,7 +244,7 @@ pte_t xen_make_pte(unsigned long long pt
    if (pte & 1)
    pte = phys_to_machine(XPADDR(pte)).maddr;

    - pte &= ~_PAGE_PCD;
    + pte &= ~(_PAGE_PCD | _PAGE_PWT);

    return (pte_t){ .pte = pte };
    }
    @@ -293,9 +293,7 @@ pte_t xen_make_pte(unsigned long pte)
    if (pte & _PAGE_PRESENT)
    pte = phys_to_machine(XPADDR(pte)).maddr;

    - pte &= ~_PAGE_PCD;
    -
    - pte &= ~_PAGE_PCD;
    + pte &= ~(_PAGE_PCD | _PAGE_PWT);

    return (pte_t){ pte };
    }



    \
     
     \ /
      Last update: 2008-01-08 23:21    [W:0.020 / U:31.332 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site