Skip to content

Commit

Permalink
KVM: x86: Issue smp_call_function_many with preemption disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Kiszka authored and Marcelo Tosatti committed Nov 5, 2010
1 parent 97e69aa commit 453d9c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -3978,8 +3978,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();
Expand Down

0 comments on commit 453d9c5

Please sign in to comment.