diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2007-12-20 19:18:26 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 11:01:21 -0500 |
commit | aaee2c94f7a1f7726e360a6cfb40173bd552bcff (patch) | |
tree | e9066ae5509c349bfd6a187e85d52cc476e16a12 /include/linux/kvm_host.h | |
parent | d7824fff896a1698a07a8046dc362f4500c302f7 (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/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 3 |
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 | ||
106 | struct kvm { | 106 | struct 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 + |