WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86 ept: ignore guest writes to read only

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 ept: ignore guest writes to read only memory regions or memory
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Oct 2009 02:40:19 -0700
Delivery-date: Fri, 23 Oct 2009 02:41:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86 ept: ignore guest writes to read only memory regions or memory, Xen patchbot-unstable <=