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-devel

[Xen-devel] [PATCH] [HVM] fix HVM restore hang

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] [HVM] fix HVM restore hang
From: "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Date: Tue, 18 Nov 2008 19:52:04 +0800
Cc: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Zhai, Edwin" <edwin.zhai@xxxxxxxxx>
Delivery-date: Tue, 18 Nov 2008 03:54:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.17 (X11/20080914)
r18383 mark video memory as ram, and make all valid pages migrated,
including vlapic page (0xFEE00), and share page(0xFFFFF).
An extra memory population for lapic page would override previous
mapping then cause HVM guest with vlapic acceleration hang.

This patch from Keir makes mmio page as invalid, so xc_domain_save
skip vlapic page.

Share page is safe, as the mapping is not set up until after normal
guest memory is restored.


--
best rgds,
edwin

Index: hv/xen/arch/x86/mm.c
===================================================================
--- hv.orig/xen/arch/x86/mm.c
+++ hv/xen/arch/x86/mm.c
@@ -1542,6 +1542,7 @@ static int mod_l1_entry(l1_pgentry_t *pl
     unsigned long mfn;
     struct page_info *l1pg = mfn_to_page(gl1mfn);
     int rc = 1;
+    p2m_type_t p2mt;
 
     page_lock(l1pg);
 
@@ -1558,8 +1559,8 @@ static int mod_l1_entry(l1_pgentry_t *pl
     if ( l1e_get_flags(nl1e) & _PAGE_PRESENT )
     {
         /* Translate foreign guest addresses. */
-        mfn = gmfn_to_mfn(FOREIGNDOM, l1e_get_pfn(nl1e));
-        if ( unlikely(mfn == INVALID_MFN) )
+        mfn = gfn_to_mfn(FOREIGNDOM, l1e_get_pfn(nl1e), &p2mt);
+        if ( !p2m_is_ram(p2mt) || unlikely(mfn == INVALID_MFN) )
             return page_unlock(l1pg), 0;
         ASSERT((mfn & ~(PADDR_MASK >> PAGE_SHIFT)) == 0);
         nl1e = l1e_from_pfn(mfn, l1e_get_flags(nl1e));
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] [HVM] fix HVM restore hang, Zhai, Edwin <=