summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorGautham R. Shenoy <ego@linux.vnet.ibm.com>2015-08-07 08:11:20 -0400
committerPaul Mackerras <paulus@samba.org>2015-09-03 02:08:34 -0400
commit06554d9f6cc8f0b5ec903db19726a15dfc7b09d6 (patch)
tree03f6337869ec9bdbe95b4fab3886418c9a4f5d05 /arch/powerpc
parent7f23532866f931be626e69ff55caf39e54516047 (diff)
KVM: PPC: Book3S HV: Exit on H_DOORBELL if HOST_IPI is set
The code that handles the case when we receive a H_DOORBELL interrupt has a comment which says "Hypervisor doorbell - exit only if host IPI flag set". However, the current code does not actually check if the host IPI flag is set. This is due to a comparison instruction that got missed. As a result, the current code performs the exit to host only if some sibling thread or a sibling sub-core is exiting to the host. This implies that, an IPI sent to a sibling core in (subcores-per-core != 1) mode will be missed by the host unless the sibling core is on the exit path to the host. This patch adds the missing comparison operation which will ensure that when HOST_IPI flag is set, we unconditionally exit to the host. Fixes: 66feed61cdf6 Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kvm/book3s_hv_rmhandlers.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index b07f04550969..2273dcacef39 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -1213,6 +1213,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
1213 cmpwi r12, BOOK3S_INTERRUPT_H_DOORBELL 1213 cmpwi r12, BOOK3S_INTERRUPT_H_DOORBELL
1214 bne 3f 1214 bne 3f
1215 lbz r0, HSTATE_HOST_IPI(r13) 1215 lbz r0, HSTATE_HOST_IPI(r13)
1216 cmpwi r0, 0
1216 beq 4f 1217 beq 4f
1217 b guest_exit_cont 1218 b guest_exit_cont
12183: 12193: