]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Move MMU notifier's mmu_lock acquisition into common helper
authorSean Christopherson <seanjc@google.com>
Fri, 2 Apr 2021 00:56:55 +0000 (17:56 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 17 Apr 2021 12:31:08 +0000 (08:31 -0400)
commit236608e169d08b3f644c0038eb89c60a952f3ed1
treed6332bb7dfb2d138a1cacad14019a3a891e6770c
parent9fef582228d77cb87b6a7706882af02b93cae423
KVM: Move MMU notifier's mmu_lock acquisition into common helper

Acquire and release mmu_lock in the __kvm_handle_hva_range() helper
instead of requiring the caller to do the same.  This paves the way for
future patches to take mmu_lock if and only if an overlapping memslot is
found, without also having to introduce the on_lock() shenanigans used
to manipulate the notifier count and sequence.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210402005658.3024832-8-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c