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] [XEN] When removing pages, drop shadow re

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] When removing pages, drop shadow refs before complaining about refcount.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 08 Feb 2007 08:50:08 -0800
Delivery-date: Thu, 08 Feb 2007 08:50:02 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1170931493 0
# Node ID 3fbe12560ffe84359e2bc7bce12b0cc34a1e398c
# Parent  6524e02edbeb8aebe65aa5400af4b09dfccb8729
[XEN] When removing pages, drop shadow refs before complaining about refcount.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 xen/common/memory.c          |   10 ++++++----
 xen/include/asm-x86/shadow.h |    5 +++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff -r 6524e02edbeb -r 3fbe12560ffe xen/common/memory.c
--- a/xen/common/memory.c       Wed Feb 07 16:53:01 2007 -0800
+++ b/xen/common/memory.c       Thu Feb 08 10:44:53 2007 +0000
@@ -175,11 +175,13 @@ int guest_remove_page(struct domain *d, 
 
     if ( unlikely(!page_is_removable(page)) )
     {
+        shadow_drop_references(d, page);
         /* We'll make this a guest-visible error in future, so take heed! */
-        gdprintk(XENLOG_INFO, "Dom%d freeing in-use page %lx (pseudophys %lx):"
-                " count=%lx type=%lx\n",
-                d->domain_id, mfn, get_gpfn_from_mfn(mfn),
-                (unsigned long)page->count_info, page->u.inuse.type_info);
+        if ( !page_is_removable(page) )
+            gdprintk(XENLOG_INFO, "Dom%d freeing in-use page %lx "
+                     "(pseudophys %lx): count=%lx type=%lx\n",
+                     d->domain_id, mfn, get_gpfn_from_mfn(mfn),
+                     (unsigned long)page->count_info, page->u.inuse.type_info);
     }
 
     guest_physmap_remove_page(d, gmfn, mfn);
diff -r 6524e02edbeb -r 3fbe12560ffe xen/include/asm-x86/shadow.h
--- a/xen/include/asm-x86/shadow.h      Wed Feb 07 16:53:01 2007 -0800
+++ b/xen/include/asm-x86/shadow.h      Thu Feb 08 10:44:53 2007 +0000
@@ -355,8 +355,9 @@ static inline void
 static inline void 
 shadow_drop_references(struct domain *d, struct page_info *p)
 {
-    /* See the comment about locking in sh_remove_all_mappings */
-    sh_remove_all_mappings(d->vcpu[0], _mfn(page_to_mfn(p)));
+    if ( unlikely(shadow_mode_enabled(d)) )
+        /* See the comment about locking in sh_remove_all_mappings */
+        sh_remove_all_mappings(d->vcpu[0], _mfn(page_to_mfn(p)));
 }
 
 /* Remove all shadows of the guest mfn. */

_______________________________________________
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] [XEN] When removing pages, drop shadow refs before complaining about refcount., Xen patchbot-unstable <=