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] HAP fault handling for shared pages.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] HAP fault handling for shared pages.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 16 Dec 2009 22:41:12 -0800
Delivery-date: Wed, 16 Dec 2009 22:43:39 -0800
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 1261031276 0
# Node ID 8cf5bffd9663fc541be4d4a1b63630787739fd0d
# Parent  98bd49474dbf9a4a1d958d30bd947f1258b5246b
HAP fault handling for shared pages.

Signed-off-by: Grzegorz Milos <Grzegorz.Milos@xxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c        |    7 +++++++
 xen/arch/x86/hvm/svm/svm.c    |    1 +
 xen/arch/x86/hvm/vmx/vmx.c    |    1 +
 xen/arch/x86/mm/hap/p2m-ept.c |    1 +
 xen/arch/x86/mm/p2m.c         |    2 ++
 5 files changed, 12 insertions(+)

diff -r 98bd49474dbf -r 8cf5bffd9663 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Thu Dec 17 06:27:56 2009 +0000
+++ b/xen/arch/x86/hvm/hvm.c    Thu Dec 17 06:27:56 2009 +0000
@@ -960,6 +960,13 @@ bool_t hvm_hap_nested_page_fault(unsigne
         return 1;
     }
 
+    /* Mem sharing: unshare the page and try again */
+    if ( p2mt == p2m_ram_shared )
+    {
+        mem_sharing_unshare_page(current->domain, gfn, 0);
+        return 1;
+    }
+ 
     /* Shouldn't happen: Maybe the guest was writing to a r/o grant mapping? */
     if ( p2mt == p2m_grant_map_ro )
     {
diff -r 98bd49474dbf -r 8cf5bffd9663 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Thu Dec 17 06:27:56 2009 +0000
+++ b/xen/arch/x86/hvm/svm/svm.c        Thu Dec 17 06:27:56 2009 +0000
@@ -30,6 +30,7 @@
 #include <asm/io.h>
 #include <asm/paging.h>
 #include <asm/p2m.h>
+#include <asm/mem_sharing.h>
 #include <asm/regs.h>
 #include <asm/cpufeature.h>
 #include <asm/processor.h>
diff -r 98bd49474dbf -r 8cf5bffd9663 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Thu Dec 17 06:27:56 2009 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Thu Dec 17 06:27:56 2009 +0000
@@ -37,6 +37,7 @@
 #include <asm/spinlock.h>
 #include <asm/paging.h>
 #include <asm/p2m.h>
+#include <asm/mem_sharing.h>
 #include <asm/hvm/emulate.h>
 #include <asm/hvm/hvm.h>
 #include <asm/hvm/support.h>
diff -r 98bd49474dbf -r 8cf5bffd9663 xen/arch/x86/mm/hap/p2m-ept.c
--- a/xen/arch/x86/mm/hap/p2m-ept.c     Thu Dec 17 06:27:56 2009 +0000
+++ b/xen/arch/x86/mm/hap/p2m-ept.c     Thu Dec 17 06:27:56 2009 +0000
@@ -71,6 +71,7 @@ static void ept_p2m_type_to_flags(ept_en
             return;
         case p2m_ram_logdirty:
         case p2m_ram_ro:
+        case p2m_ram_shared:
             entry->r = entry->x = 1;
             entry->w = 0;
             return;
diff -r 98bd49474dbf -r 8cf5bffd9663 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c     Thu Dec 17 06:27:56 2009 +0000
+++ b/xen/arch/x86/mm/p2m.c     Thu Dec 17 06:27:56 2009 +0000
@@ -91,6 +91,8 @@ static unsigned long p2m_type_to_flags(p
         return flags | P2M_BASE_FLAGS;
     case p2m_ram_ro:
     case p2m_grant_map_ro:
+        return flags | P2M_BASE_FLAGS;
+    case p2m_ram_shared:
         return flags | P2M_BASE_FLAGS;
     case p2m_mmio_dm:
         return flags;

_______________________________________________
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] HAP fault handling for shared pages., Xen patchbot-unstable <=