• Zachary Amsden's avatar
    [PATCH] paravirt: lazy mmu mode hooks.patch · 6606c3e0
    Zachary Amsden authored
    Implement lazy MMU update hooks which are SMP safe for both direct and shadow
    page tables.  The idea is that PTE updates and page invalidations while in
    lazy mode can be batched into a single hypercall.  We use this in VMI for
    shadow page table synchronization, and it is a win.  It also can be used by
    PPC and for direct page tables on Xen.
    
    For SMP, the enter / leave must happen under protection of the page table
    locks for page tables which are being modified.  This is because otherwise,
    you end up with stale state in the batched hypercall, which other CPUs can
    race ahead of.  Doing this under the protection of the locks guarantees the
    synchronization is correct, and also means that spurious faults which are
    generated during this window by remote CPUs are properly handled, as the page
    fault handler must re-check the PTE under protection of the same lock.
    Signed-off-by: default avatarZachary Amsden <zach@vmware.com>
    Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Cc: Andi Kleen <ak@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    6606c3e0
mremap.c 10.7 KB