[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix PAE ptep_get_and_clear_full(). The fast path requires us to manually clear



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID ccf3d5cd14284c84ceea2a84a7fb94219d9ef354
# Parent  7d8efd4f1ac77f70316be26ff9fb6e7bd923b45a
Fix PAE ptep_get_and_clear_full(). The fast path requires us to manually clear
the low half before the high half. Otherwise the compiler may reorder the writes
and validation in Xen will fail.

From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 7d8efd4f1ac7 -r ccf3d5cd1428 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable.h      Tue Mar 
14 14:18:35 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable.h      Tue Mar 
14 14:25:33 2006
@@ -272,7 +272,16 @@
        pte_t pte;
        if (full) {
                pte = *ptep;
+#ifdef CONFIG_X86_PAE
+               /* Cannot do this in a single step, as the compiler may
+                  issue the two stores in either order, but the hypervisor
+                  must not see the high part before the low one. */
+               ptep->pte_low = 0;
+               barrier();
+               ptep->pte_high = 0;
+#else
                *ptep = __pte(0);
+#endif
        } else {
                pte = ptep_get_and_clear(mm, addr, ptep);
        }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.