Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a89780f3b84f9a421e2608580b55f12b3ac4f9c2
Commit:     a89780f3b84f9a421e2608580b55f12b3ac4f9c2
Parent:     261a5ec36befbe6bae069be14f45e618dcd35146
Author:     Jeremy Fitzhardinge <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:33:39 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:33:39 2008 +0100

    xen: fix mismerge in masking pte flags
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 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 3e9e095..e618473 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)
 
 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 };
 }
@@ -288,10 +290,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 };
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to