Skip to content

Commit 99a17b7

Browse files
committed
Documentation: kvm: include new locks
kvm->mn_invalidate_lock and kvm->slots_arch_lock were not included in the documentation, add them. Signed-off-by: Paolo Bonzini <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent e9611bf commit 99a17b7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Documentation/virt/kvm/locking.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ time it will be set using the Dirty tracking mechanism described above.
226226
:Comment: 'raw' because hardware enabling/disabling must be atomic /wrt
227227
migration.
228228

229+
``kvm->mn_invalidate_lock``
230+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
231+
232+
:Type: spinlock_t
233+
:Arch: any
234+
:Protects: mn_active_invalidate_count, mn_memslots_update_rcuwait
229235

230236
``kvm_arch::tsc_write_lock``
231237
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -255,6 +261,15 @@ time it will be set using the Dirty tracking mechanism described above.
255261
The srcu index can be stored in kvm_vcpu->srcu_idx per vcpu
256262
if it is needed by multiple functions.
257263

264+
``kvm->slots_arch_lock``
265+
^^^^^^^^^^^^^^^^^^^^^^^^
266+
:Type: mutex
267+
:Arch: any (only needed on x86 though)
268+
:Protects: any arch-specific fields of memslots that have to be modified
269+
in a ``kvm->srcu`` read-side critical section.
270+
:Comment: must be held before reading the pointer to the current memslots,
271+
until after all changes to the memslots are complete
272+
258273
``wakeup_vcpus_on_cpu_lock``
259274
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
260275
:Type: spinlock_t

0 commit comments

Comments
 (0)