Sean Christopherson e18c5429e0 KVM: x86/mmu: Assert that correct locks are held for page write-tracking
When adding/removing gfns to/from write-tracking, assert that mmu_lock
is held for write, and that either slots_lock or kvm->srcu is held.
mmu_lock must be held for write to protect gfn_write_track's refcount,
and SRCU or slots_lock must be held to protect the memslot itself.

Tested-by: Yan Zhao <yan.y.zhao@intel.com>
Tested-by: Yongwei Ma <yongwei.ma@intel.com>
Link: https://lore.kernel.org/r/20230729013535.1070024-26-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-08-31 14:08:16 -04:00
..
2023-08-04 17:16:14 -07:00
2023-08-31 13:36:33 -04:00
2023-06-28 20:35:21 -07:00
2023-07-01 11:40:01 -07:00
2023-06-27 21:24:18 -07:00
2023-04-08 13:45:37 -07:00
2023-06-29 11:00:17 -07:00
2023-07-13 13:39:36 -07:00
2022-07-25 10:32:32 +02:00
2023-08-07 17:03:54 -07:00
2023-05-15 20:03:08 +02:00