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-3.4-testing] x86 ept: ignore guest writes to read o

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] x86 ept: ignore guest writes to read only memory regions or memory
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Oct 2009 02:40:47 -0700
Delivery-date: Fri, 23 Oct 2009 02:43:11 -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 1256290441 -3600
# Node ID 2a5604621e21435c9421ffca2419151566e49014
# Parent  156dde712ec083b37e09415a704b37e510f13764
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-unstable changeset:   20364:e36ffdd9e8cf
xen-unstable date:        Fri Oct 23 10:13:52 2009 +0100
---
 xen/arch/x86/hvm/vmx/vmx.c |   11 +++++++++++
 1 files changed, 11 insertions(+)

diff -r 156dde712ec0 -r 2a5604621e21 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Fri Oct 23 10:32:00 2009 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Fri Oct 23 10:34:01 2009 +0100
@@ -2154,6 +2154,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-3.4-testing] x86 ept: ignore guest writes to read only memory regions or memory, Xen patchbot-3.4-testing <=