ia64/xen-unstable

changeset 18807:f09a1d5d4338

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>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Nov 18 15:59:26 2008 +0000 (2008-11-18)
parents ed8524f4a044
children 9958ef441af0
files xen/arch/x86/mm.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Tue Nov 18 15:55:14 2008 +0000
     1.2 +++ b/xen/arch/x86/mm.c	Tue Nov 18 15:59:26 2008 +0000
     1.3 @@ -1604,6 +1604,7 @@ static int mod_l1_entry(l1_pgentry_t *pl
     1.4      struct domain *d = curr->domain;
     1.5      unsigned long mfn;
     1.6      struct page_info *l1pg = mfn_to_page(gl1mfn);
     1.7 +    p2m_type_t p2mt;
     1.8      int rc = 1;
     1.9  
    1.10      page_lock(l1pg);
    1.11 @@ -1621,8 +1622,8 @@ static int mod_l1_entry(l1_pgentry_t *pl
    1.12      if ( l1e_get_flags(nl1e) & _PAGE_PRESENT )
    1.13      {
    1.14          /* Translate foreign guest addresses. */
    1.15 -        mfn = gmfn_to_mfn(FOREIGNDOM, l1e_get_pfn(nl1e));
    1.16 -        if ( unlikely(mfn == INVALID_MFN) )
    1.17 +        mfn = mfn_x(gfn_to_mfn(FOREIGNDOM, l1e_get_pfn(nl1e), &p2mt));
    1.18 +        if ( !p2m_is_ram(p2mt) || unlikely(mfn == INVALID_MFN) )
    1.19              return page_unlock(l1pg), 0;
    1.20          ASSERT((mfn & ~(PADDR_MASK >> PAGE_SHIFT)) == 0);
    1.21          nl1e = l1e_from_pfn(mfn, l1e_get_flags(nl1e));