diff options
author | Ben Gardon <bgardon@google.com> | 2021-02-02 10:57:24 -0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-02-04 05:27:43 -0500 |
commit | 531810caa9f4bc99ffbb90e09256792c56a6b07a (patch) | |
tree | 2f8d7a33fea95476a3181b4f1aca2e1f973a4295 /arch/x86/include | |
parent | f3d4b4b1dc1c5fb9ea17cac14133463bfe72f170 (diff) | |
download | linux-531810caa9f4bc99ffbb90e09256792c56a6b07a.tar.gz linux-531810caa9f4bc99ffbb90e09256792c56a6b07a.tar.bz2 linux-531810caa9f4bc99ffbb90e09256792c56a6b07a.zip |
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>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index fa7b2df6422b..c445a51244d3 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -348,6 +348,8 @@ struct kvm_mmu_root_info { #define KVM_MMU_NUM_PREV_ROOTS 3 +#define KVM_HAVE_MMU_RWLOCK + struct kvm_mmu_page; /* |