Out-of-sync L1 shadows: always unsync pages on guest writes.
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 20 Jun 2008 17:41:50 +0000 (18:41 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 20 Jun 2008 17:41:50 +0000 (18:41 +0100)
Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
xen/arch/x86/mm/shadow/multi.c

index f9594f8fc7fdd8ac299df67d51e8b614c1f0c7bc..4253f57328b710ce980ef4f70b28bc3eb82e24c1 100644 (file)
@@ -3288,6 +3288,13 @@ static int sh_page_fault(struct vcpu *v,
         return 0;
     }
 
+#if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC)
+    /* Always unsync when writing to L1 page tables. */
+    if ( sh_mfn_is_a_page_table(gmfn)
+         && ft == ft_demand_write )
+        sh_unsync(v, gmfn, va);
+#endif /* OOS */
+
     /* Calculate the shadow entry and write it */
     l1e_propagate_from_guest(v, gw.l1e, gmfn, &sl1e, ft, p2mt);
     r = shadow_set_l1e(v, ptr_sl1e, sl1e, sl1mfn);