aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2007-12-20 19:18:26 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 11:01:21 -0500
commitaaee2c94f7a1f7726e360a6cfb40173bd552bcff (patch)
treee9066ae5509c349bfd6a187e85d52cc476e16a12 /include/linux
parentd7824fff896a1698a07a8046dc362f4500c302f7 (diff)
KVM: MMU: Switch to mmu spinlock
Convert the synchronization of the shadow handling to a separate mmu_lock spinlock. Also guard fetch() by mmap_sem in read-mode to protect against alias and memslot changes. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kvm_host.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index a020fb280540..2714068ee8bc 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -104,7 +104,8 @@ struct kvm_memory_slot {
104}; 104};
105 105
106struct kvm { 106struct kvm {
107 struct mutex lock; /* protects everything except vcpus */ 107 struct mutex lock; /* protects the vcpus array and APIC accesses */
108 spinlock_t mmu_lock;
108 struct mm_struct *mm; /* userspace tied to this vm */ 109 struct mm_struct *mm; /* userspace tied to this vm */
109 int nmemslots; 110 int nmemslots;
110 struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS + 111 struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS +