Don't crash xen if hvm_read() from paged or shared memory
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.
Signed-off-by Steven Hand <[email protected]>
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
@@ -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();