Skip to contentSkip to conversation

Don't crash xen if hvm_read() from paged or shared memory

PATCH New Steven Hand 1 participant 1 message Mar 25, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Don't crash xen if hvm_read() from paged or shared memory

There are two new return cases from hvm_copy_from_guest_virt() to deal with paging or shared memory -- retry the emulation rather than crash.

xen/arch/x86/mm/shadow/common.c Thu Mar 25 18:33:01 2010 +0000 renamed from xen/arch/x86/mm/shadow/common.c Thu Mar 25 11:38:46 2010 +0000 +3 -0
diff -r 25a3b799ff0e xen/arch/x86/mm/shadow/common.c
@@ -180,6 +180,9 @@
     case HVMCOPY_bad_gfn_to_mfn:
     case HVMCOPY_unhandleable:
         return X86EMUL_UNHANDLEABLE;
+    case HVMCOPY_gfn_paged_out: 
+    case HVMCOPY_gfn_shared:
+        return X86EMUL_RETRY;
     }
 
     BUG();