Commit 58e3948a authored by Paolo Bonzini's avatar Paolo Bonzini

KVM: document lock orders

This is long overdue, and not really hard.
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Message-Id: <1476357057-17899-1-git-send-email-pbonzini@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 36343f6e
...@@ -4,7 +4,17 @@ KVM Lock Overview ...@@ -4,7 +4,17 @@ KVM Lock Overview
1. Acquisition Orders 1. Acquisition Orders
--------------------- ---------------------
(to be written) 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.
For spinlocks, kvm_lock is taken outside kvm->mmu_lock. Everything
else is a leaf: no other lock is taken inside the critical sections.
2: Exception 2: Exception
------------ ------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment