[PATCH RFC 03/12] Documentation: KVM: Consolidate notes about kvm->slots_lock and irq_lock

From: Ackerley Tng via B4 Relay

Date: Wed May 27 2026 - 11:38:18 EST


From: Ackerley Tng <ackerleytng@xxxxxxxxxx>

Move the detail about ordering between kvm->slots_lock and kvm->irq_lock to
where the two locks are first mentioned.

Signed-off-by: Ackerley Tng <ackerleytng@xxxxxxxxxx>
---
Documentation/virt/kvm/locking.rst | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Documentation/virt/kvm/locking.rst b/Documentation/virt/kvm/locking.rst
index 1e8cbbe3ba706..67dd2066f6d98 100644
--- a/Documentation/virt/kvm/locking.rst
+++ b/Documentation/virt/kvm/locking.rst
@@ -21,12 +21,11 @@ The acquisition orders for mutexes are as follows:
- kvm->lock is taken outside vcpu->mutex

- kvm->lock is taken outside kvm->slots_lock and kvm->irq_lock
+ - kvm->slots_lock is taken outside kvm->irq_lock, though acquiring
+ them together is quite rare.

- vcpu->mutex is taken outside kvm->slots_lock and kvm->slots_arch_lock

-- kvm->slots_lock is taken outside kvm->irq_lock, though acquiring
- them together is quite rare.
-
- kvm->mn_active_invalidate_count ensures that pairs of
invalidate_range_start() and invalidate_range_end() callbacks
use the same memslots array. kvm->slots_lock and kvm->slots_arch_lock

--
2.54.0.823.g6e5bcc1fc9-goog