diff options
author | Izik Eidus <izike@qumranet.com> | 2008-02-10 11:04:15 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-03-04 08:19:40 -0500 |
commit | 72dc67a69690288538142df73a7e3ac66fea68dc (patch) | |
tree | f40cc5ef0c66686a469977fd438e5b6786f16280 /include/linux/kvm_host.h | |
parent | c7ac679c160db864810920df61a6ed14275011aa (diff) |
KVM: remove the usage of the mmap_sem for the protection of the memory slots.
This patch replaces the mmap_sem lock for the memory slots with a new
kvm private lock, it is needed beacuse untill now there were cases where
kvm accesses user memory while holding the mmap semaphore.
Signed-off-by: Izik Eidus <izike@qumranet.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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index ea4764b0a2f..928b0d59e9b 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -107,6 +107,7 @@ struct kvm_memory_slot { | |||
107 | struct kvm { | 107 | struct kvm { |
108 | struct mutex lock; /* protects the vcpus array and APIC accesses */ | 108 | struct mutex lock; /* protects the vcpus array and APIC accesses */ |
109 | spinlock_t mmu_lock; | 109 | spinlock_t mmu_lock; |
110 | struct rw_semaphore slots_lock; | ||
110 | struct mm_struct *mm; /* userspace tied to this vm */ | 111 | struct mm_struct *mm; /* userspace tied to this vm */ |
111 | int nmemslots; | 112 | int nmemslots; |
112 | struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS + | 113 | struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS + |