x86 shadow: Fix cross-page write emulation failure.
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 1 Feb 2008 11:21:27 +0000 (11:21 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 1 Feb 2008 11:21:27 +0000 (11:21 +0000)
Signed-off-by: Disheng Su <disheng.su@intel.com>
xen/arch/x86/mm/shadow/multi.c

index 6a8d5e1a155fa94ce7f571e07a81258048bfbf64..c9f16bf4bb8f63874d20d7a1dc7f82f1e50953dc 100644 (file)
@@ -4076,7 +4076,7 @@ static void *emulate_map_dest(struct vcpu *v,
         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 */