]> 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)
commit6ba7575570228821f02b9a957004bd3355e8a290
tree68ffaeaa56bb214ae14e21deeca4fad32a3819fd
parentdc0ebd777461b92af4d3e78dcf5dfe15cf7d7f9a
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