[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XEN] Shadow: tidy up page_info before handing back to the allocator



# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1173370730 0
# Node ID f78b4aad353ec349e582cedbc2191186ecfc182b
# Parent  345effaf2258f1059172023d542ff011468d702c
[XEN] Shadow: tidy up page_info before handing back to the allocator
which expects count_info fields to be zero.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/common.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -r 345effaf2258 -r f78b4aad353e xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Thu Mar 08 15:51:32 2007 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Thu Mar 08 16:18:50 2007 +0000
@@ -1129,6 +1129,7 @@ shadow_free_p2m_page(struct domain *d, s
         SHADOW_ERROR("Odd p2m page count c=%#x t=%"PRtype_info"\n",
                      pg->count_info, pg->u.inuse.type_info);
     }
+    pg->count_info = 0;
     /* Free should not decrement domain's total allocation, since 
      * these pages were allocated without an owner. */
     page_set_owner(pg, NULL); 
@@ -1243,6 +1244,9 @@ static unsigned int sh_set_allocation(st
             list_del(&sp->list);
             d->arch.paging.shadow.free_pages -= 1<<SHADOW_MAX_ORDER;
             d->arch.paging.shadow.total_pages -= 1<<SHADOW_MAX_ORDER;
+            for ( j = 0; j < 1<<SHADOW_MAX_ORDER; j++ ) 
+                /* Keep the page allocator happy */
+                ((struct page_info *)sp)[j].count_info = 0;
             free_domheap_pages((struct page_info *)sp, SHADOW_MAX_ORDER);
         }
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.