]> xenbits.xensource.com Git - xen.git/commitdiff
[SHADOW] Fix up change that allowed MMIO mappings to be shadowed
authorKeir Fraser <keir@xensource.com>
Wed, 7 Nov 2007 13:41:29 +0000 (13:41 +0000)
committerKeir Fraser <keir@xensource.com>
Wed, 7 Nov 2007 13:41:29 +0000 (13:41 +0000)
so it doesn't let us map INVALID_MFN as a shadow pagetable page.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen/arch/x86/mm/shadow/multi.c

index a148b16a242e1ee5386a3bae9cd3c09fd70e975e..8eddd61538830a55b9191a949cccb16e9063c14e 100644 (file)
@@ -716,12 +716,14 @@ _sh_propagate(struct vcpu *v,
         goto done;
     }
 
-    // Must have a valid target_mfn unless this is a prefetch.  In the
-    // case of a prefetch, an invalid mfn means that we can not usefully
-    // shadow anything, and so we return early.
+    // Must have a valid target_mfn unless this is a prefetch or an l1
+    // pointing at MMIO space.  In the case of a prefetch, an invalid
+    // mfn means that we can not usefully shadow anything, and so we
+    // return early.
     //
-    if ( shadow_mode_refcounts(d) && 
-         !mfn_valid(target_mfn) && (p2mt != p2m_mmio_direct) )
+    if ( !mfn_valid(target_mfn)
+         && !(level == 1 && (!shadow_mode_refcounts(d) 
+                             || p2mt == p2m_mmio_direct)) )
     {
         ASSERT((ft == ft_prefetch));
         *sp = shadow_l1e_empty();