diff -rN -u -p old-xen-64-4/xen/arch/x86/mm.c new-xen-64-4/xen/arch/x86/mm.c --- old-xen-64-4/xen/arch/x86/mm.c 2005-05-31 23:14:18.000000000 +0000 +++ new-xen-64-4/xen/arch/x86/mm.c 2005-05-31 23:14:19.000000000 +0000 @@ -2029,7 +2029,7 @@ int do_mmu_update( l1_pgentry_t l1e; /* FIXME: doesn't work with PAE */ - l1e = l1e_create_phys(req.val, req.val); + l1e = l1e_create_phys(req.val, get_pte_flags(req.val)); okay = mod_l1_entry(va, l1e); if ( okay && unlikely(shadow_mode_enabled(d)) ) shadow_l1_normal_pt_update(d, req.ptr, l1e, &sh_mapcache); @@ -2044,7 +2044,7 @@ int do_mmu_update( l2_pgentry_t l2e; /* FIXME: doesn't work with PAE */ - l2e = l2e_create_phys(req.val, req.val); + l2e = l2e_create_phys(req.val, get_pte_flags(req.val)); okay = mod_l2_entry((l2_pgentry_t *)va, l2e, mfn, type_info); if ( okay && unlikely(shadow_mode_enabled(d)) ) shadow_l2_normal_pt_update(d, req.ptr, l2e, &sh_mapcache); @@ -2059,7 +2059,7 @@ int do_mmu_update( l3_pgentry_t l3e; /* FIXME: doesn't work with PAE */ - l3e = l3e_create_phys(req.val,req.val); + l3e = l3e_create_phys(req.val, get_pte_flags(req.val)); okay = mod_l3_entry(va, l3e, mfn); if ( okay && unlikely(shadow_mode_enabled(d)) ) shadow_l3_normal_pt_update(d, req.ptr, l3e, &sh_mapcache); @@ -2074,7 +2074,7 @@ int do_mmu_update( { l4_pgentry_t l4e; - l4e = l4e_create_phys(req.val,req.val); + l4e = l4e_create_phys(req.val, get_pte_flags(req.val)); okay = mod_l4_entry(va, l4e, mfn); if ( okay && unlikely(shadow_mode_enabled(d)) ) shadow_l4_normal_pt_update(d, req.ptr, l4e, &sh_mapcache); @@ -2251,7 +2251,7 @@ int do_update_va_mapping(unsigned long v unsigned long val32, unsigned long flags) { - l1_pgentry_t val = l1e_create_phys(val32,val32); + l1_pgentry_t val = l1e_create_phys(val32, get_pte_flags(val32)); struct exec_domain *ed = current; struct domain *d = ed->domain; unsigned int cpu = ed->processor; @@ -2741,7 +2741,7 @@ static int ptwr_emulated_update( } /* Check the new PTE. */ - nl1e = l1e_create_phys(val, val & ~PAGE_MASK); + nl1e = l1e_create_phys(val, get_pte_flags(val)); if ( unlikely(!get_page_from_l1e(nl1e, d)) ) return X86EMUL_UNHANDLEABLE; @@ -2749,7 +2749,7 @@ static int ptwr_emulated_update( pl1e = map_domain_mem(page_to_phys(page) + (addr & ~PAGE_MASK)); if ( do_cmpxchg ) { - ol1e = l1e_create_phys(old, old & ~PAGE_MASK); + ol1e = l1e_create_phys(old, get_pte_flags(old)); if ( cmpxchg((unsigned long *)pl1e, old, val) != old ) { unmap_domain_mem(pl1e);