lkml.org 
[lkml]   [2008]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 01 of 11] xen: fix mismerge in masking pte flags
    Date
    From
    Looks like a mismerge/misapply dropped one of the cases of pte flag
    masking for Xen. Also, only mask the flags for present ptes.

    Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
    ---
    arch/x86/xen/mmu.c | 10 ++++++----
    1 file changed, 6 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,8 +244,10 @@ unsigned long long xen_pgd_val(pgd_t pgd

    pte_t xen_make_pte(unsigned long long pte)
    {
    - if (pte & 1)
    + if (pte & _PAGE_PRESENT) {
    pte = phys_to_machine(XPADDR(pte)).maddr;
    + pte &= ~(_PAGE_PCD | _PAGE_PWT);
    + }

    return (pte_t){ .pte = pte };
    }
    @@ -291,10 +293,10 @@ unsigned long xen_pgd_val(pgd_t pgd)

    pte_t xen_make_pte(unsigned long pte)
    {
    - if (pte & _PAGE_PRESENT)
    + if (pte & _PAGE_PRESENT) {
    pte = phys_to_machine(XPADDR(pte)).maddr;
    -
    - pte &= ~(_PAGE_PCD | _PAGE_PWT);
    + pte &= ~(_PAGE_PCD | _PAGE_PWT);
    + }

    return (pte_t){ pte };
    }



    \
     
     \ /
      Last update: 2008-01-25 22:55    [W:0.026 / U:31.240 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site