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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
 
 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 };
 }
 
 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 };
 }