diff options
Diffstat (limited to 'Documentation/virtual/kvm/locking.txt')
-rw-r--r-- | Documentation/virtual/kvm/locking.txt | 19 |
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 | ||
134 | Name: kvm_lock | 134 | Name: kvm_lock |
135 | Type: raw_spinlock | 135 | Type: spinlock_t |
136 | Arch: any | 136 | Arch: any |
137 | Protects: - vm_list | 137 | Protects: - vm_list |
138 | - hardware virtualization enable/disable | 138 | |
139 | Name: kvm_count_lock | ||
140 | Type: raw_spinlock_t | ||
141 | Arch: any | ||
142 | Protects: - hardware virtualization enable/disable | ||
139 | Comment: 'raw' because hardware enabling/disabling must be atomic /wrt | 143 | Comment: 'raw' because hardware enabling/disabling must be atomic /wrt |
140 | migration. | 144 | migration. |
141 | 145 | ||
@@ -151,3 +155,14 @@ Type: spinlock_t | |||
151 | Arch: any | 155 | Arch: any |
152 | Protects: -shadow page/shadow tlb entry | 156 | Protects: -shadow page/shadow tlb entry |
153 | Comment: it is a spinlock since it is used in mmu notifier. | 157 | Comment: it is a spinlock since it is used in mmu notifier. |
158 | |||
159 | Name: kvm->srcu | ||
160 | Type: srcu lock | ||
161 | Arch: any | ||
162 | Protects: - kvm->memslots | ||
163 | - kvm->buses | ||
164 | Comment: 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. | ||