Commit ac63cf0a authored by Sean Christopherson's avatar Sean Christopherson Committed by Yu Zhang
Browse files

KVM: Move MMU notifier's mmu_lock acquisition into common helper

mainline inclusion
from mainline-v5.13-rc1
commit f922bd9b
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I7S3VQ
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f922bd9bf33bd5a8c6694927f010f32127810fbf



----------------------------------------------------------------------

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: default avatarSean Christopherson <seanjc@google.com>
Message-Id: <20210402005658.3024832-8-seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>

conflict:
	virt/kvm/kvm_main.c

Signed-off-by: default avatarYu Zhang <yu.c.zhang@linux.intel.com>
parent ef18d479
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment