ia64/xen-unstable

changeset 13379:dc0638bb4628

[HVM] Allow a dom to have nonsense m2p entries when building the p2m
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Thu Jan 11 10:08:14 2007 +0000 (2007-01-11)
parents e66f047bc97e
children 558960865583
files xen/arch/x86/mm/shadow/common.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/common.c	Tue Jan 09 18:56:44 2007 -0800
     1.2 +++ b/xen/arch/x86/mm/shadow/common.c	Thu Jan 11 10:08:14 2007 +0000
     1.3 @@ -1303,6 +1303,9 @@ shadow_alloc_p2m_table(struct domain *d)
     1.4      if ( !shadow_set_p2m_entry(d, gfn, mfn) )
     1.5          goto error;
     1.6  
     1.7 +    /* Build a p2m map that matches the m2p entries for this domain's
     1.8 +     * allocated pages.  Skip any pages that have an explicitly invalid
     1.9 +     * or obviously bogus m2p entry. */
    1.10      for ( entry = d->page_list.next;
    1.11            entry != &d->page_list;
    1.12            entry = entry->next )
    1.13 @@ -1318,6 +1321,8 @@ shadow_alloc_p2m_table(struct domain *d)
    1.14              (gfn != 0x55555555L)
    1.15  #endif
    1.16               && gfn != INVALID_M2P_ENTRY
    1.17 +             && (gfn < 
    1.18 +                 (RO_MPT_VIRT_END - RO_MPT_VIRT_START) / sizeof (l1_pgentry_t))
    1.19               && !shadow_set_p2m_entry(d, gfn, mfn) )
    1.20              goto error;
    1.21      }