• Paul Mackerras's avatar
    KVM: PPC: Book3S HV: Don't wake thread with no vcpu on guest IPI · ccc07772
    Paul Mackerras authored
    When running a multi-threaded guest and vcpu 0 in a virtual core
    is not running in the guest (i.e. it is busy elsewhere in the host),
    thread 0 of the physical core will switch the MMU to the guest and
    then go to nap mode in the code at kvm_do_nap.  If the guest sends
    an IPI to thread 0 using the msgsndp instruction, that will wake
    up thread 0 and cause all the threads in the guest to exit to the
    host unnecessarily.  To avoid the unnecessary exit, this arranges
    for the PECEDP bit to be cleared in this situation.  When napping
    due to a H_CEDE from the guest, we still set PECEDP so that the
    thread will wake up on an IPI sent using msgsndp.
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    ccc07772
book3s_hv_rmhandlers.S 60.3 KB