Skip to contentSkip to conversation

Out-of-sync L1 shadows: Always unsync policy.

PATCH New Gianluca Guida 1 participant 1 message Jun 20, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 Out-of-sync L1 shadows: Always unsync policy.

Unsync policy: always unsync pages on guest writes.

xen/arch/x86/mm/shadow/multi.c +7 -0
diff -r e1c198471d4d xen/arch/x86/mm/shadow/multi.c
@@ -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);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel