Skip to contentSkip to conversation

KVM: x86: Issue smp_call_function_many with preemption disabled

PATCH Applied Jan Kiszka 1 participant 1 message Nov 1, 2010

Subsystems (3)
lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/2 KVM: x86: Issue smp_call_function_many with preemption disabled

From: Jan Kiszka <[email protected]>

smp_call_function_many is specified to be called only with preemption disabled. Fulfill this requirement.

---
 arch/x86/kvm/x86.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kvm/x86.c +2 -0
index 2cfdf2d..0ed6dad 100644
@@ -4012,8 +4012,10 @@ int kvm_emulate_wbinvd(struct kvm_vcpu *vcpu)
 		return X86EMUL_CONTINUE;
 
 	if (kvm_x86_ops->has_wbinvd_exit()) {
+		preempt_disable();
 		smp_call_function_many(vcpu->arch.wbinvd_dirty_mask,
 				wbinvd_ipi, NULL, 1);
+		preempt_enable();
 		cpumask_clear(vcpu->arch.wbinvd_dirty_mask);
 	}
 	wbinvd();
Signature · 1 line
1.7.1