KVM: X86: Yield to IPI target if necessary
authorWanpeng Li <wanpengli@tencent.com>
Tue, 11 Jun 2019 12:23:48 +0000 (20:23 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Jul 2019 16:56:01 +0000 (18:56 +0200)
commitf85f6e7bc9682a6d8b342c010cd6aa58521fdeec
tree5ca2f323769a35386e2a24b4c21d4c099778e950
parent11e349143e3289ab99f1b4858649f60703b7bf35
KVM: X86: Yield to IPI target if necessary

When sending a call-function IPI-many to vCPUs, yield if any of
the IPI target vCPUs was preempted, we just select the first
preempted target vCPU which we found since the state of target
vCPUs can change underneath and to avoid race conditions.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Liran Alon <liran.alon@oracle.com>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Documentation/virtual/kvm/hypercalls.txt
arch/x86/include/uapi/asm/kvm_para.h
arch/x86/kernel/kvm.c
include/uapi/linux/kvm_para.h