]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Don't let VCPU sleep if it has a doorbell pending
authorPaul Mackerras <paulus@ozlabs.org>
Fri, 19 May 2017 06:26:16 +0000 (16:26 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Mon, 19 Jun 2017 04:05:22 +0000 (14:05 +1000)
commit5434f0ffa3730a6e0631bfb9b574ce93ca4bcd94
tree68ffaeaa56bb214ae14e21deeca4fad32a3819fd
parent71713bba21dbae046d32b7773bcd9f363d64fc53
KVM: PPC: Book3S HV: Don't let VCPU sleep if it has a doorbell pending

It is possible, through a narrow race condition, for a VCPU to exit
the guest with a H_CEDE hypercall while it has a doorbell interrupt
pending.  In this case, the H_CEDE should return immediately, but in
fact it puts the VCPU to sleep until some other interrupt becomes
pending or a prod is received (via another VCPU doing H_PROD).

This fixes it by checking the DPDES (Directed Privileged Doorbell
Exception Status) bit for the thread along with the other interrupt
pending bits.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_hv.c