diff options
author | Izik Eidus <izike@qumranet.com> | 2008-02-10 18:04:15 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-03-04 15:19:40 +0200 |
commit | 72dc67a69690288538142df73a7e3ac66fea68dc (patch) | |
tree | f40cc5ef0c66686a469977fd438e5b6786f16280 /include/linux | |
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')
-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 ea4764b0a2f4..928b0d59e9ba 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -107,6 +107,7 @@ struct kvm_memory_slot { struct kvm { struct mutex lock; /* protects the vcpus array and APIC accesses */ spinlock_t mmu_lock; + struct rw_semaphore slots_lock; struct mm_struct *mm; /* userspace tied to this vm */ int nmemslots; struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS + |