ia64/xen-unstable

changeset 16345:c982fe8a9f91

[SHADOW] Fix up change that allowed MMIO mappings to be shadowed
so it doesn't let us map INVALID_MFN as a shadow pagetable page.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
author Keir Fraser <keir@xensource.com>
date Wed Nov 07 13:41:29 2007 +0000 (2007-11-07)
parents ff2edb1fd9f2
children 00db9ec39831
files xen/arch/x86/mm/shadow/multi.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/multi.c	Wed Nov 07 11:44:05 2007 +0000
     1.2 +++ b/xen/arch/x86/mm/shadow/multi.c	Wed Nov 07 13:41:29 2007 +0000
     1.3 @@ -716,12 +716,14 @@ static always_inline void
     1.4          goto done;
     1.5      }
     1.6  
     1.7 -    // Must have a valid target_mfn unless this is a prefetch.  In the
     1.8 -    // case of a prefetch, an invalid mfn means that we can not usefully
     1.9 -    // shadow anything, and so we return early.
    1.10 +    // Must have a valid target_mfn unless this is a prefetch or an l1
    1.11 +    // pointing at MMIO space.  In the case of a prefetch, an invalid
    1.12 +    // mfn means that we can not usefully shadow anything, and so we
    1.13 +    // return early.
    1.14      //
    1.15 -    if ( shadow_mode_refcounts(d) && 
    1.16 -         !mfn_valid(target_mfn) && (p2mt != p2m_mmio_direct) )
    1.17 +    if ( !mfn_valid(target_mfn)
    1.18 +         && !(level == 1 && (!shadow_mode_refcounts(d) 
    1.19 +                             || p2mt == p2m_mmio_direct)) )
    1.20      {
    1.21          ASSERT((ft == ft_prefetch));
    1.22          *sp = shadow_l1e_empty();