[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86 ept: ignore guest writes to read only memory regions or memory
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1256289232 -3600 # Node ID e36ffdd9e8cf2ce70abcb07e99ad90d8919a2649 # Parent 6bb2ea81491620e6aabbebed2da99ffd77da53b0 x86 ept: ignore guest writes to read only memory regions or memory holes in EPT. This patch prevents domain crash when running memtest86 with EPT. Signed-off-by: Xin Li <xin.li@xxxxxxxxx> --- xen/arch/x86/hvm/vmx/vmx.c | 11 +++++++++++ 1 files changed, 11 insertions(+) diff -r 6bb2ea814916 -r e36ffdd9e8cf xen/arch/x86/hvm/vmx/vmx.c --- a/xen/arch/x86/hvm/vmx/vmx.c Fri Oct 23 10:13:22 2009 +0100 +++ b/xen/arch/x86/hvm/vmx/vmx.c Fri Oct 23 10:13:52 2009 +0100 @@ -2184,6 +2184,17 @@ static void ept_handle_violation(unsigne return; } + /* Ignore writes to: + * 1. read only memory regions; + * 2. memory holes. */ + if ( (qualification & EPT_WRITE_VIOLATION) + && (((gla_validity == EPT_GLA_VALIDITY_MATCH) && (t == p2m_ram_ro)) + || (mfn_x(mfn) == INVALID_MFN)) ) { + int inst_len = __get_instruction_length(); + __update_guest_eip(inst_len); + return; + } + /* Everything else is an error. */ gla = __vmread(GUEST_LINEAR_ADDRESS); gdprintk(XENLOG_ERR, "EPT violation %#lx (%c%c%c/%c%c%c), " _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |