[HVM] Remove unnecessary write barriers
authorTim Deegan <Tim.Deegan@xensource.com>
Tue, 9 Jan 2007 16:49:16 +0000 (16:49 +0000)
committerTim Deegan <Tim.Deegan@xensource.com>
Tue, 9 Jan 2007 16:49:16 +0000 (16:49 +0000)
Using a volatile pointer saves us from the compier reordering these
writes, and the processor won't let them appear out of order.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
xen/arch/x86/mm/shadow/multi.c

index ba4659d325c98e28f970092abeea7e831c424ecb..e040e60e7145f13d8df6fb0227dd567d8fdad543 100644 (file)
@@ -851,9 +851,7 @@ static inline void safe_write_entry(void *dst, void *src)
      * then writing the high word before the low word. */
     BUILD_BUG_ON(sizeof (shadow_l1e_t) != 2 * sizeof (unsigned long));
     d[0] = 0;
-    wmb();
     d[1] = s[1];
-    wmb();
     d[0] = s[0];
 #else
     /* In 32-bit and 64-bit, sizeof(pte) == sizeof(ulong) == 1 word,