• Zachary Amsden's avatar
    [PATCH] paravirt: optimize ptep establish for pae · d6d861e3
    Zachary Amsden authored
    The ptep_establish macro is only used on user-level PTEs, for P->P mapping
    changes.  Since these always happen under protection of the pagetable lock,
    the strong synchronization of a 64-bit cmpxchg is not needed, in fact, not
    even a lock prefix needs to be used.  We can simply instead clear the P-bit,
    followed by a normal set.  The write ordering is still important to avoid the
    possibility of the TLB snooping a partially written PTE and getting a bad
    mapping installed.
    Signed-off-by: default avatarZachary Amsden <zach@vmware.com>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
    Cc: Andi Kleen <ak@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    d6d861e3
pgtable-2level.h 2.2 KB