diff options
-rw-r--r-- | Documentation/virtual/kvm/locking.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/virtual/kvm/locking.txt b/Documentation/virtual/kvm/locking.txt index 41b7ac9884b5..a9f366e73c8e 100644 --- a/Documentation/virtual/kvm/locking.txt +++ b/Documentation/virtual/kvm/locking.txt | |||
@@ -151,3 +151,14 @@ Type: spinlock_t | |||
151 | Arch: any | 151 | Arch: any |
152 | Protects: -shadow page/shadow tlb entry | 152 | Protects: -shadow page/shadow tlb entry |
153 | Comment: it is a spinlock since it is used in mmu notifier. | 153 | Comment: it is a spinlock since it is used in mmu notifier. |
154 | |||
155 | Name: kvm->srcu | ||
156 | Type: srcu lock | ||
157 | Arch: any | ||
158 | Protects: - kvm->memslots | ||
159 | - kvm->buses | ||
160 | Comment: The srcu read lock must be held while accessing memslots (e.g. | ||
161 | when using gfn_to_* functions) and while accessing in-kernel | ||
162 | MMIO/PIO address->device structure mapping (kvm->buses). | ||
163 | The srcu index can be stored in kvm_vcpu->srcu_idx per vcpu | ||
164 | if it is needed by multiple functions. | ||