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 shadow: don't try to unsshadow for

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] x86 shadow: don't try to unsshadow for p2m changes after the shadows
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Nov 2009 00:40:58 -0800
Delivery-date: Fri, 27 Nov 2009 00:42:36 -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 1259310859 0
# Node ID e89ccff41980090abb71181ec4e12d9b873da185
# Parent  7c0c26abbf2824fcf5f4096f011b1c24409ac21a
x86 shadow: don't try to unsshadow for p2m changes after the shadows
have been torn down.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
xen-unstable changeset:   20508:e6515469c466
xen-unstable date:        Thu Nov 26 11:31:16 2009 +0000
---
 xen/arch/x86/mm/shadow/common.c |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff -r 7c0c26abbf28 -r e89ccff41980 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Fri Nov 27 08:33:48 2009 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Fri Nov 27 08:34:19 2009 +0000
@@ -3417,14 +3417,12 @@ static int shadow_test_disable(struct do
  * with new content. It is responsible for update the entry, as well as other 
  * shadow processing jobs.
  */
-void
-shadow_write_p2m_entry(struct vcpu *v, unsigned long gfn, 
-                       l1_pgentry_t *p, mfn_t table_mfn, 
-                       l1_pgentry_t new, unsigned int level)
+
+static void sh_unshadow_for_p2m_change(struct vcpu *v, unsigned long gfn, 
+                                       l1_pgentry_t *p, mfn_t table_mfn, 
+                                       l1_pgentry_t new, unsigned int level)
 {
     struct domain *d = v->domain;
-    
-    shadow_lock(d);
 
     /* If we're removing an MFN from the p2m, remove it from the shadows too */
     if ( level == 1 )
@@ -3480,6 +3478,21 @@ shadow_write_p2m_entry(struct vcpu *v, u
                 unmap_domain_page(npte);
         }
     }
+}
+
+void
+shadow_write_p2m_entry(struct vcpu *v, unsigned long gfn, 
+                       l1_pgentry_t *p, mfn_t table_mfn, 
+                       l1_pgentry_t new, unsigned int level)
+{
+    struct domain *d = v->domain;
+    
+    shadow_lock(d);
+
+    /* If there are any shadows, update them.  But if shadow_teardown()
+     * has already been called then it's not safe to try. */ 
+    if ( likely(d->arch.paging.shadow.total_pages != 0) )
+         sh_unshadow_for_p2m_change(v, gfn, p, table_mfn, new, level);
 
     /* Update the entry with new content */
     safe_write_pte(p, new);

_______________________________________________
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 shadow: don't try to unsshadow for p2m changes after the shadows, Xen patchbot-3.4-testing <=