]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Don't wake thread with no vcpu on guest IPI
authorPaul Mackerras <paulus@samba.org>
Sat, 28 Mar 2015 03:21:07 +0000 (14:21 +1100)
committerAlexander Graf <agraf@suse.de>
Tue, 21 Apr 2015 13:21:32 +0000 (15:21 +0200)
commit152f04b7985806931760797f49bc04e2ef1c6fbc
treec6f47a2039a097c82a0917b211c4e4d325a9ea64
parent7ab5fbb39e02d8624aa975cf5f75da1185a236ca
KVM: PPC: Book3S HV: Don't wake thread with no vcpu on guest IPI

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: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/book3s_hv_rmhandlers.S