diff options
| author | Sean Christopherson <[email protected]> | 2025-02-04 00:40:37 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2025-02-14 15:17:44 +0000 |
| commit | bb6c7749ccee3452a4aff95dda2616e73fe14982 (patch) | |
| tree | 0c68c92d20a41d72f1e0eb0659ae7bef997ea560 /tools/testing/selftests/net/lib/py/utils.py | |
| parent | KVM: x86/mmu: Add infrastructure to allow walking rmaps outside of mmu_lock (diff) | |
| download | kernel-bb6c7749ccee3452a4aff95dda2616e73fe14982.tar.gz kernel-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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions
