diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2013-09-09 11:32:56 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-09-24 13:12:12 -0400 |
commit | 519192aaae38e24d6b32d3d55d791fe294981185 (patch) | |
tree | d813696b9b6b1837b7396d399bd6283d3a1e7da7 /Documentation | |
parent | 4a10c2ac2f368583138b774ca41fac4207911983 (diff) |
KVM: Add documentation for kvm->srcu lock
This patch documents the kvm->srcu lock (using the information from
a mail which has been posted by Marcelo Tosatti to the kvm mailing
list some months ago, see the following URL for details:
http://www.mail-archive.com/kvm@vger.kernel.org/msg90040.html )
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Documentation')
-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. | ||