* [PATCH] [HVM] fix HVM restore hang
@ 2008-11-18 11:52 Zhai, Edwin
0 siblings, 0 replies; only message in thread
From: Zhai, Edwin @ 2008-11-18 11:52 UTC (permalink / raw)
To: Keir Fraser; +Cc: Xen Developers, Zhai, Edwin
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
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
[-- Attachment #2: hvm_sr_fix.patch --]
[-- Type: text/plain, Size: 914 bytes --]
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));
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-18 11:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-18 11:52 [PATCH] [HVM] fix HVM restore hang Zhai, Edwin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.