Skip to content

Commit 453d9c5

Browse files
jan-kiszkamatosatti
authored andcommitted
KVM: x86: Issue smp_call_function_many with preemption disabled
smp_call_function_many is specified to be called only with preemption disabled. Fulfill this requirement. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
1 parent 97e69aa commit 453d9c5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎arch/x86/kvm/x86.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3978,8 +3978,10 @@ int kvm_emulate_wbinvd(struct kvm_vcpu *vcpu)
39783978
return X86EMUL_CONTINUE;
39793979

39803980
if (kvm_x86_ops->has_wbinvd_exit()) {
3981+
preempt_disable();
39813982
smp_call_function_many(vcpu->arch.wbinvd_dirty_mask,
39823983
wbinvd_ipi, NULL, 1);
3984+
preempt_enable();
39833985
cpumask_clear(vcpu->arch.wbinvd_dirty_mask);
39843986
}
39853987
wbinvd();

0 commit comments

Comments
 (0)