diff options
author | 2025-02-04 00:40:37 +0000 | |
---|---|---|
committer | 2025-02-14 07:17:44 -0800 | |
commit | bb6c7749ccee3452a4aff95dda2616e73fe14982 (patch) | |
tree | 0c68c92d20a41d72f1e0eb0659ae7bef997ea560 /scripts/lib/kdoc/kdoc_files.py | |
parent | KVM: x86/mmu: Add infrastructure to allow walking rmaps outside of mmu_lock (diff) | |
download | linux-rng-bb6c7749ccee3452a4aff95dda2616e73fe14982.tar.xz linux-rng-bb6c7749ccee3452a4aff95dda2616e73fe14982.zip |
KVM: x86/mmu: Add support for lockless walks of rmap SPTEs
Add a lockless version of for_each_rmap_spte(), which is pretty much the
same as the normal version, except that it doesn't BUG() the host if a
non-present SPTE is encountered. When mmu_lock is held, it should be
impossible for a different task to zap a SPTE, _and_ zapped SPTEs must
be removed from their rmap chain prior to dropping mmu_lock. Thus, the
normal walker BUG()s if a non-present SPTE is encountered as something is
wildly broken.
When walking rmaps without holding mmu_lock, the SPTEs pointed at by the
rmap chain can be zapped/dropped, and so a lockless walk can observe a
non-present SPTE if it runs concurrently with a different operation that
is zapping SPTEs.
Signed-off-by: James Houghton <jthoughton@google.com>
Link: https://lore.kernel.org/r/20250204004038.1680123-11-jthoughton@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions