aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/kvm_host.h2
-rw-r--r--virt/kvm/kvm_main.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 3145b281de9d..a3fd0f91d943 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -161,7 +161,7 @@ struct kvm_memslots {
161 161
162struct kvm { 162struct kvm {
163 spinlock_t mmu_lock; 163 spinlock_t mmu_lock;
164 spinlock_t requests_lock; 164 raw_spinlock_t requests_lock;
165 struct mutex slots_lock; 165 struct mutex slots_lock;
166 struct mm_struct *mm; /* userspace tied to this vm */ 166 struct mm_struct *mm; /* userspace tied to this vm */
167 struct kvm_memslots *memslots; 167 struct kvm_memslots *memslots;
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 0a360c26cc34..548f9253c195 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -138,7 +138,7 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req)
138 138
139 zalloc_cpumask_var(&cpus, GFP_ATOMIC); 139 zalloc_cpumask_var(&cpus, GFP_ATOMIC);
140 140
141 spin_lock(&kvm->requests_lock); 141 raw_spin_lock(&kvm->requests_lock);
142 me = smp_processor_id(); 142 me = smp_processor_id();
143 kvm_for_each_vcpu(i, vcpu, kvm) { 143 kvm_for_each_vcpu(i, vcpu, kvm) {
144 if (test_and_set_bit(req, &vcpu->requests)) 144 if (test_and_set_bit(req, &vcpu->requests))
@@ -153,7 +153,7 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req)
153 smp_call_function_many(cpus, ack_flush, NULL, 1); 153 smp_call_function_many(cpus, ack_flush, NULL, 1);
154 else 154 else
155 called = false; 155 called = false;
156 spin_unlock(&kvm->requests_lock); 156 raw_spin_unlock(&kvm->requests_lock);
157 free_cpumask_var(cpus); 157 free_cpumask_var(cpus);
158 return called; 158 return called;
159} 159}
@@ -409,7 +409,7 @@ static struct kvm *kvm_create_vm(void)
409 kvm->mm = current->mm; 409 kvm->mm = current->mm;
410 atomic_inc(&kvm->mm->mm_count); 410 atomic_inc(&kvm->mm->mm_count);
411 spin_lock_init(&kvm->mmu_lock); 411 spin_lock_init(&kvm->mmu_lock);
412 spin_lock_init(&kvm->requests_lock); 412 raw_spin_lock_init(&kvm->requests_lock);
413 kvm_eventfd_init(kvm); 413 kvm_eventfd_init(kvm);
414 mutex_init(&kvm->lock); 414 mutex_init(&kvm->lock);
415 mutex_init(&kvm->irq_lock); 415 mutex_init(&kvm->irq_lock);