KVM: MMU: Concurrent guest walkers
authorMarcelo Tosatti <mtosatti@redhat.com>
Fri, 21 Dec 2007 00:18:22 +0000 (19:18 -0500)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 16:01:20 +0000 (18:01 +0200)
commit10589a4699bb978c781ce73bbae8ca942c5250c9
tree5585ed87fff0a2ba259fcc6f998022481da75f68
parent774ead3ad9bcbc05ef6aaebb9bdf8b4c3126923b
KVM: MMU: Concurrent guest walkers

Do not hold kvm->lock mutex across the entire pagefault code,
only acquire it in places where it is necessary, such as mmu
hash list, active list, rmap and parent pte handling.

Allow concurrent guest walkers by switching walk_addr() to use
mmap_sem in read-mode.

And get rid of the lockless __gfn_to_page.

[avi: move kvm_mmu_pte_write() locking inside the function]
[avi: add locking for real mode]
[avi: fix cmpxchg locking]

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/mmu.c
arch/x86/kvm/paging_tmpl.h
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c
virt/kvm/kvm_main.c