diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-02-24 17:28:10 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-02-24 17:35:13 +0100 |
commit | 5f0028625b529f647e747d043ebde087be60e5b7 (patch) | |
tree | 84034c16ca2000549d80588e1c2b99579c3bc45f /virt | |
parent | 7642e2b2138188d789b314b54033a1732f9d0736 (diff) | |
download | lwn-5f0028625b529f647e747d043ebde087be60e5b7.tar.gz lwn-5f0028625b529f647e747d043ebde087be60e5b7.zip |
kvm: make_all_cpus_request() needs preempt_disable() on RT
smp_call_function_many() needs to be called with preemption disabled,
but on RT spin_lock(&kvm->requests_lock) is not doing that.
Explicitely disable preemption on RT for the smp_call_function_many()
call.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index a51ba60a78b1..6d0e484b40f3 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -145,12 +145,14 @@ static bool make_all_cpus_request(struct kvm *kvm, unsigned int req) if (cpus != NULL && cpu != -1 && cpu != me) cpumask_set_cpu(cpu, cpus); } + preempt_disable_rt(); if (unlikely(cpus == NULL)) smp_call_function_many(cpu_online_mask, ack_flush, NULL, 1); else if (!cpumask_empty(cpus)) smp_call_function_many(cpus, ack_flush, NULL, 1); else called = false; + preempt_enable_rt(); spin_unlock(&kvm->requests_lock); free_cpumask_var(cpus); return called; |