summaryrefslogtreecommitdiffstats
path: root/Documentation/virtual/kvm/locking.txt
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-11-16 14:19:34 +0100
committerThomas Gleixner <tglx@linutronix.de>2016-11-16 14:19:34 +0100
commit7ce7f35b33eb42b6aa4cf176fa34372b21b8472b (patch)
tree12f3027003f1d7cce30f838265e4fab2d52c6cef /Documentation/virtual/kvm/locking.txt
parentx86/intel_rdt: Update percpu closid immeditately on CPUs affected by changee (diff)
parentx86/cpuid: Provide get_scattered_cpuid_leaf() (diff)
downloadlinux-7ce7f35b33eb42b6aa4cf176fa34372b21b8472b.tar.xz
linux-7ce7f35b33eb42b6aa4cf176fa34372b21b8472b.zip
Merge branch 'x86/cpufeature' into x86/cache
Resolve the cpu/scattered conflict. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'Documentation/virtual/kvm/locking.txt')
-rw-r--r--Documentation/virtual/kvm/locking.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/Documentation/virtual/kvm/locking.txt b/Documentation/virtual/kvm/locking.txt
index f2491a8c68b4..e5dd9f4d6100 100644
--- a/Documentation/virtual/kvm/locking.txt
+++ b/Documentation/virtual/kvm/locking.txt
@@ -4,7 +4,17 @@ KVM Lock Overview
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
------------