提交 519192aa 编写于 作者: T Thomas Huth 提交者: Paolo Bonzini

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: NThomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: NXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 4a10c2ac
...@@ -151,3 +151,14 @@ Type: spinlock_t ...@@ -151,3 +151,14 @@ Type: spinlock_t
Arch: any Arch: any
Protects: -shadow page/shadow tlb entry Protects: -shadow page/shadow tlb entry
Comment: it is a spinlock since it is used in mmu notifier. Comment: it is a spinlock since it is used in mmu notifier.
Name: kvm->srcu
Type: srcu lock
Arch: any
Protects: - kvm->memslots
- kvm->buses
Comment: The srcu read lock must be held while accessing memslots (e.g.
when using gfn_to_* functions) and while accessing in-kernel
MMIO/PIO address->device structure mapping (kvm->buses).
The srcu index can be stored in kvm_vcpu->srcu_idx per vcpu
if it is needed by multiple functions.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册