KVM: mmu_shrink: kvm_mmu_zap_page requires slots_lock to be held
authorMarcelo Tosatti <mtosatti@redhat.com>
Thu, 3 Jul 2008 21:33:02 +0000 (18:33 -0300)
committerAvi Kivity <avi@qumranet.com>
Sun, 20 Jul 2008 09:42:38 +0000 (12:42 +0300)
commit5a4c92880493945678315a6df810f7a21f55b985
tree2a03286d5f9ea2e6f9426bbf153d3044122105e6
parent7e37c2998a5a0b00134f6227167694b710f57ac0
KVM: mmu_shrink: kvm_mmu_zap_page requires slots_lock to be held

kvm_mmu_zap_page() needs slots lock held (rmap_remove->gfn_to_memslot,
for example).

Since kvm_lock spinlock is held in mmu_shrink(), do a non-blocking
down_read_trylock().

Untested.

Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/mmu.c