36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
|
# HG changeset patch
|
||
|
# User Keir Fraser <keir.fraser@citrix.com>
|
||
|
# Date 1227023966 0
|
||
|
# Node ID f09a1d5d4338eab9c593b63b8ae89ddf481a3681
|
||
|
# Parent ed8524f4a044efbd6d30f9340c6ddfb00f972407
|
||
|
x86, hvm: Fix domain restore bug with Intel VLAPIC acceleration.
|
||
|
|
||
|
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.
|
||
|
|
||
|
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||
|
|
||
|
--- a/xen/arch/x86/mm.c
|
||
|
+++ b/xen/arch/x86/mm.c
|
||
|
@@ -1541,6 +1541,7 @@ static int mod_l1_entry(l1_pgentry_t *pl
|
||
|
struct domain *d = curr->domain;
|
||
|
unsigned long mfn;
|
||
|
struct page_info *l1pg = mfn_to_page(gl1mfn);
|
||
|
+ p2m_type_t p2mt;
|
||
|
int rc = 1;
|
||
|
|
||
|
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 = mfn_x(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));
|