KVM: x86/mmu: Make TDP MMU root refcount atomic
authorBen Gardon <bgardon@google.com>
Thu, 1 Apr 2021 23:37:29 +0000 (16:37 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 19 Apr 2021 13:05:25 +0000 (09:05 -0400)
commit11cccf5c04721c8a08f9d72a1a5e7281a4041d86
tree6b947f54a2ef6203a59d051adf6fda5d33d0ea9c
parentcfc109979b3c879ea9df05e048bb83615964f3e3
KVM: x86/mmu: Make TDP MMU root refcount atomic

In order to parallelize more operations for the TDP MMU, make the
refcount on TDP MMU roots atomic, so that a future patch can allow
multiple threads to take a reference on the root concurrently, while
holding the MMU lock in read mode.

Signed-off-by: Ben Gardon <bgardon@google.com>
Message-Id: <20210401233736.638171-7-bgardon@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu_internal.h
arch/x86/kvm/mmu/tdp_mmu.c
arch/x86/kvm/mmu/tdp_mmu.h