aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-02-08 06:55:33 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2011-03-17 12:08:30 -0400
commite935b8372cf8c63dc618a9f2b24ab360a225f1cd (patch)
tree024c5f7a7f76dab86fc905398ab31e28e5465821 /arch/x86/kvm/x86.c
parentbd3d1ec3d26b61120bb4f60b18ee99aa81839e6b (diff)
KVM: Convert kvm_lock to raw_spinlock
Code under this lock requires non-preemptibility. Ensure this also over -rt by converting it to raw spinlock. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index bd59e8ede88e..d9855b8584cf 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4557,7 +4557,7 @@ static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long va
4557 4557
4558 smp_call_function_single(freq->cpu, tsc_khz_changed, freq, 1); 4558 smp_call_function_single(freq->cpu, tsc_khz_changed, freq, 1);
4559 4559
4560 spin_lock(&kvm_lock); 4560 raw_spin_lock(&kvm_lock);
4561 list_for_each_entry(kvm, &vm_list, vm_list) { 4561 list_for_each_entry(kvm, &vm_list, vm_list) {
4562 kvm_for_each_vcpu(i, vcpu, kvm) { 4562 kvm_for_each_vcpu(i, vcpu, kvm) {
4563 if (vcpu->cpu != freq->cpu) 4563 if (vcpu->cpu != freq->cpu)
@@ -4567,7 +4567,7 @@ static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long va
4567 send_ipi = 1; 4567 send_ipi = 1;
4568 } 4568 }
4569 } 4569 }
4570 spin_unlock(&kvm_lock); 4570 raw_spin_unlock(&kvm_lock);
4571 4571
4572 if (freq->old < freq->new && send_ipi) { 4572 if (freq->old < freq->new && send_ipi) {
4573 /* 4573 /*