mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
KVM: x86/mmu: Use an rwlock for the x86 MMU
Add a read / write lock to be used in place of the MMU spinlock on x86. The rwlock will enable the TDP MMU to handle page faults, and other operations in parallel in future commits. Reviewed-by: Peter Feiner <pfeiner@google.com> Signed-off-by: Ben Gardon <bgardon@google.com> Message-Id: <20210202185734.1680553-19-bgardon@google.com> [Introduce virt/kvm/mmu_lock.h - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
f3d4b4b1dc
commit
531810caa9
@@ -451,7 +451,12 @@ struct kvm_memslots {
|
||||
};
|
||||
|
||||
struct kvm {
|
||||
#ifdef KVM_HAVE_MMU_RWLOCK
|
||||
rwlock_t mmu_lock;
|
||||
#else
|
||||
spinlock_t mmu_lock;
|
||||
#endif /* KVM_HAVE_MMU_RWLOCK */
|
||||
|
||||
struct mutex slots_lock;
|
||||
struct mm_struct *mm; /* userspace tied to this vm */
|
||||
struct kvm_memslots __rcu *memslots[KVM_ADDRESS_SPACE_NUM];
|
||||
|
Reference in New Issue
Block a user