xen/16962-cross-page-write-failure.patch

22 lines
1015 B
Diff

# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1201864887 0
# Node ID 3787e70b2ab219de50dff7417917fd9f9ccfcc35
# Parent 396ab902b02daf14deed0f3261c1c179b7378b4d
x86 shadow: Fix cross-page write emulation failure.
Signed-off-by: Disheng Su <disheng.su@intel.com>
Index: xen-3.2-testing/xen/arch/x86/mm/shadow/multi.c
===================================================================
--- xen-3.2-testing.orig/xen/arch/x86/mm/shadow/multi.c
+++ xen-3.2-testing/xen/arch/x86/mm/shadow/multi.c
@@ -4076,7 +4076,7 @@ static void *emulate_map_dest(struct vcp
sh_ctxt->mfn2 = emulate_gva_to_mfn(v, (vaddr + bytes - 1) & PAGE_MASK,
sh_ctxt);
if ( !mfn_valid(sh_ctxt->mfn2) )
- return ((mfn_x(sh_ctxt->mfn1) == BAD_GVA_TO_GFN) ?
+ return ((mfn_x(sh_ctxt->mfn2) == BAD_GVA_TO_GFN) ?
MAPPING_EXCEPTION : MAPPING_UNHANDLEABLE);
/* Cross-page writes mean probably not a pagetable */