From: "Zhai, Edwin" <edwin.zhai@intel.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: Xen Developers <xen-devel@lists.xensource.com>,
"Zhai, Edwin" <edwin.zhai@intel.com>
Subject: [PATCH] [HVM] fix HVM restore hang
Date: Tue, 18 Nov 2008 19:52:04 +0800 [thread overview]
Message-ID: <4922AC64.8030902@intel.com> (raw)
[-- 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
reply other threads:[~2008-11-18 11:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4922AC64.8030902@intel.com \
--to=edwin.zhai@intel.com \
--cc=keir.fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.