OSDN Git Service

KVM: x86/mmu: Add helpers to read/write TDP MMU SPTEs and document RCU
authorSean Christopherson <seanjc@google.com>
Sat, 26 Feb 2022 00:15:28 +0000 (00:15 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 Mar 2022 14:31:52 +0000 (09:31 -0500)
commit0e587aa7335588ac5e12ef707f7979ff91b11751
tree832b7a195e3aa0b7989cfab3f5b408bb480b7178
parenta151aceca1e46be1defdaceea7c28108fa0ad022
KVM: x86/mmu: Add helpers to read/write TDP MMU SPTEs and document RCU

Add helpers to read and write TDP MMU SPTEs instead of open coding
rcu_dereference() all over the place, and to provide a convenient
location to document why KVM doesn't exempt holding mmu_lock for write
from having to hold RCU (and any future changes to the rules).

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Ben Gardon <bgardon@google.com>
Message-Id: <20220226001546.360188-11-seanjc@google.com>
Reviewed-by: Mingwei Zhang <mizhang@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/tdp_iter.c
arch/x86/kvm/mmu/tdp_iter.h
arch/x86/kvm/mmu/tdp_mmu.c