Commit 9fb13ba6 authored by Sean Christopherson's avatar Sean Christopherson
Browse files

KVM: x86/mmu: Refactor low level rmap helpers to prep for walking w/o mmu_lock



Refactor the pte_list and rmap code to always read and write rmap_head->val
exactly once, e.g. by collecting changes in a local variable and then
propagating those changes back to rmap_head->val as appropriate.  This will
allow implementing a per-rmap rwlock (of sorts) by adding a LOCKED bit into
the rmap value alongside the MANY bit.

Signed-off-by: default avatarJames Houghton <jthoughton@google.com>
Acked-by: default avatarYu Zhao <yuzhao@google.com>
Reviewed-by: default avatarJames Houghton <jthoughton@google.com>
Link: https://lore.kernel.org/r/20250204004038.1680123-9-jthoughton@google.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 8c403cf2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment