• Li RongQing's avatar
    KVM: x86: Yield to IPI target vCPU only if it is busy · 9ee83635
    Li RongQing authored
    When sending a call-function IPI-many to vCPUs, yield to the
    IPI target vCPU which is marked as preempted.
    
    but when emulating HLT, an idling vCPU will be voluntarily
    scheduled out and mark as preempted from the guest kernel
    perspective. yielding to idle vCPU is pointless and increase
    unnecessary vmexit, maybe miss the true preempted vCPU
    
    so yield to IPI target vCPU only if vCPU is busy and preempted
    Signed-off-by: default avatarLi RongQing <lirongqing@baidu.com>
    Message-Id: <1644380201-29423-1-git-send-email-lirongqing@baidu.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    9ee83635
kvm.c 27.1 KB