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

[Xen-changelog] [xen-unstable] shadow: Re-initialise page_info's lock field when freeing shadow pages.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1214573921 -3600
# Node ID 7eab6475c60afc47d1b33231d7b768232370aee6
# Parent  cebedb30a9644bdd1b7a610eaddef764c59806f9
shadow: Re-initialise page_info's lock field when freeing shadow pages.

Fixes boot failure of xenU after destroying a HVM guest.

Signed-off-by: Dongxiao Xu <dongxiao.xu@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/common.c |    8 ++++++++
 1 files changed, 8 insertions(+)

diff -r cebedb30a964 -r 7eab6475c60a xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Fri Jun 27 14:16:53 2008 +0100
+++ b/xen/arch/x86/mm/shadow/common.c   Fri Jun 27 14:38:41 2008 +0100
@@ -1830,6 +1830,14 @@ static unsigned int sh_set_allocation(st
             sp = list_entry(d->arch.paging.shadow.freelists[order].next,
                             struct shadow_page_info, list);
             list_del(&sp->list);
+#if defined(__x86_64__)
+            /*
+             * Re-instate lock field which we overwrite with shadow_page_info.
+             * This was safe, since the lock is only used on guest pages.
+             */
+            for ( j = 0; j < 1U << order; j++ )
+                spin_lock_init(&((struct page_info *)sp)[j].lock);
+#endif
             d->arch.paging.shadow.free_pages -= 1 << order;
             d->arch.paging.shadow.total_pages -= 1 << order;
             free_domheap_pages((struct page_info *)sp, 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®.