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] Shadow code bug fix (found by Ian) that was breaking ref

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Shadow code bug fix (found by Ian) that was breaking refcounts, and subsequently
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Fri, 13 May 2005 11:14:06 +0000
Delivery-date: Fri, 13 May 2005 20:06:12 +0000
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/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 Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1159.258.120, 2005/05/13 12:14:06+01:00, mafetter@xxxxxxxxxxxxxxxx

        Shadow code bug fix (found by Ian) that was breaking refcounts, and 
subsequently
        causing migration problems.



 memory.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)


diff -Nru a/xen/arch/x86/memory.c b/xen/arch/x86/memory.c
--- a/xen/arch/x86/memory.c     2005-05-13 16:06:48 -04:00
+++ b/xen/arch/x86/memory.c     2005-05-13 16:06:48 -04:00
@@ -1607,13 +1607,14 @@
             unsigned l2_idx = page_nr >> (L2_PAGETABLE_SHIFT - 
L1_PAGETABLE_SHIFT);
             l2_pgentry_t gpde = linear_l2_table[l2_idx];
             unsigned long gpfn = l2_pgentry_val(gpde) >> PAGE_SHIFT;
+            unsigned long spfn;
 
-            if (get_shadow_status(&d->mm, gpfn))
+            if ((spfn = (get_shadow_status(&d->mm, gpfn) & PSH_pfn_mask)))
             {
-                unsigned long *gl1e = map_domain_mem(gpfn << PAGE_SHIFT);
+                unsigned long *sl1e = map_domain_mem(spfn << PAGE_SHIFT);
                 unsigned l1_idx = page_nr & (ENTRIES_PER_L1_PAGETABLE - 1);
-                gl1e[l1_idx] = sval;
-                unmap_domain_mem(gl1e);
+                sl1e[l1_idx] = sval;
+                unmap_domain_mem(sl1e);
                 put_shadow_status(&d->mm);
 
                 perfc_incrc(shadow_update_va_fail1);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>