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

RE: [Xen-devel][PATCH] Fix the boot failure of xenU after destroying aHVM guest



I tried this patch on my system, and xenU works OK.

diff -r 0d707feab01e xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Mon Jul 07 16:13:53 2008 +0100
+++ b/xen/arch/x86/mm/shadow/common.c   Wed Jul 16 15:47:02 2008 +0800
@@ -1676,6 +1676,9 @@ shadow_free_p2m_page(struct domain *d, s
     /* Free should not decrement domain's total allocation, since
      * these pages were allocated without an owner. */
     page_set_owner(pg, NULL);
+#if defined(__x86_64__)
+    spin_lock_init(&(pg->lock))
+#endif
     free_domheap_pages(pg, 0);
     d->arch.paging.shadow.p2m_pages--;
     perfc_decr(shadow_alloc_count);

Best Regards,
-- Dongxiao

-----Original Message-----
From: Keir Fraser [mailto:keir.fraser@xxxxxxxxxxxxx] 
Sent: 2008年7月16日 15:24
To: Xu, Dongxiao; xen-devel@xxxxxxxxxxxxxxxxxxx
Cc: Tim Deegan
Subject: Re: [Xen-devel][PATCH] Fix the boot failure of xenU after destroying 
aHVM guest

It's only polite for a subsystem which trashes page_info to reinstate it
when it is done. We'll work out a patch for the p2m code.

 -- Keir

On 16/7/08 01:56, "Xu, Dongxiao" <dongxiao.xu@xxxxxxxxx> wrote:

> Hi, Keir, 
>     I saw in C/S 17899, you put the re-initialize code of the page lock in
> sh_set_allocation() instead of free_heap_pages(). In this condition, I think
> we should also re-initialize the page lock while freeing the shadow p2m page
> and maybe some other places. Because when alloc the shadow p2m page, it will
> use function sh_alloc_p2m_pages()->shadow_alloc() to initialize the page as
> shadow_page_info, so the re-initialize when freeing shadow p2m is necessary.
>     So I think if only put the page lock re-initialize code in
> free_heap_pages(), it is the most safe. And it could fix the bug 1287.
> 
> 1. Sometimes XenU guest cannot boot up on 32e host.
> http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1287
> 
> Thanks
> -- Dongxiao
> 
> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Xu, Dongxiao
> Sent: 2008年6月26日 14:12
> To: Keir Fraser; xen-devel@xxxxxxxxxxxxxxxxxxx
> Cc: jbeulich@xxxxxxxxxx
> Subject: [Xen-devel][PATCH] Fix the boot failure of xenU after destroying aHVM
> guest
> 
> Fix the boot failure of xenU after destroying a HVM guest.
> - Both page_info and shadow_page_info are stored in frame_table.
> At first, all spin locks in frame table are initialized as
> SPIN_LOCK_UNLOCKED.
> If one frame is used as shadow_page_info, we still should initialize the
> spin lock to be SPIN_LOCK_UNLOCKED when freeing that page.
> 
> Signed-off-by: Dongxiao Xu <dongxiao.xu@xxxxxxxxx>
> 
> Best Regards,
> -- Dongxiao
> 



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


 


Rackspace

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