aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/virtual/kvm/locking.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/virtual/kvm/locking.txt')
-rw-r--r--Documentation/virtual/kvm/locking.txt19
1 files changed, 17 insertions, 2 deletions
diff --git a/Documentation/virtual/kvm/locking.txt b/Documentation/virtual/kvm/locking.txt
index 41b7ac9884b5..f8869410d40c 100644
--- a/Documentation/virtual/kvm/locking.txt
+++ b/Documentation/virtual/kvm/locking.txt
@@ -132,10 +132,14 @@ See the comments in spte_has_volatile_bits() and mmu_spte_update().
132------------ 132------------
133 133
134Name: kvm_lock 134Name: kvm_lock
135Type: raw_spinlock 135Type: spinlock_t
136Arch: any 136Arch: any
137Protects: - vm_list 137Protects: - vm_list
138 - hardware virtualization enable/disable 138
139Name: kvm_count_lock
140Type: raw_spinlock_t
141Arch: any
142Protects: - hardware virtualization enable/disable
139Comment: 'raw' because hardware enabling/disabling must be atomic /wrt 143Comment: 'raw' because hardware enabling/disabling must be atomic /wrt
140 migration. 144 migration.
141 145
@@ -151,3 +155,14 @@ Type: spinlock_t
151Arch: any 155Arch: any
152Protects: -shadow page/shadow tlb entry 156Protects: -shadow page/shadow tlb entry
153Comment: it is a spinlock since it is used in mmu notifier. 157Comment: it is a spinlock since it is used in mmu notifier.
158
159Name: kvm->srcu
160Type: srcu lock
161Arch: any
162Protects: - kvm->memslots
163 - kvm->buses
164Comment: The srcu read lock must be held while accessing memslots (e.g.
165 when using gfn_to_* functions) and while accessing in-kernel
166 MMIO/PIO address->device structure mapping (kvm->buses).
167 The srcu index can be stored in kvm_vcpu->srcu_idx per vcpu
168 if it is needed by multiple functions.