diff options
author | Rick Edgecombe <rick.p.edgecombe@intel.com> | 2024-07-18 14:12:13 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-12-23 08:28:49 -0500 |
commit | 35be969d1ef2c99a98f4b788f7839e6ee5b51ff8 (patch) | |
tree | e73507980a9a8c48b9c5a400235fea3e1a24c6e2 /virt | |
parent | 67b43038ce14d6b0673bdffb2052d879065c94ae (diff) |
KVM: x86/mmu: Zap invalid roots with mmu_lock holding for write at uninit
Prepare for a future TDX patch which asserts that atomic zapping
(i.e. zapping with mmu_lock taken for read) don't operate on mirror roots.
When tearing down a VM, all roots have to be zapped (including mirror
roots once they're in place) so do that with the mmu_lock taken for write.
kvm_mmu_uninit_tdp_mmu() is invoked either before or after executing any
atomic operations on SPTEs by vCPU threads. Therefore, it will not impact
vCPU threads performance if kvm_tdp_mmu_zap_invalidated_roots() acquires
mmu_lock for write to zap invalid roots.
Co-developed-by: Yan Zhao <yan.y.zhao@intel.com>
Signed-off-by: Yan Zhao <yan.y.zhao@intel.com>
Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Message-ID: <20240718211230.1492011-2-rick.p.edgecombe@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions