KVM: PPC: Book3S HV: Exit on H_DOORBELL if HOST_IPI is set
authorGautham R. Shenoy <ego@linux.vnet.ibm.com>
Fri, 7 Aug 2015 12:11:20 +0000 (17:41 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Sep 2015 17:05:41 +0000 (10:05 -0700)
commit76c77a45a74a51dc7bdf7773d8ec37ba7cffe361
tree94e85b213175cc2624cf53d1c923cb4e4ddd4456
parent8609dd0dc11cf342adc727d5f19e471ed291cf4e
KVM: PPC: Book3S HV: Exit on H_DOORBELL if HOST_IPI is set

commit 06554d9f6cc8f0b5ec903db19726a15dfc7b09d6 upstream.

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
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kvm/book3s_hv_rmhandlers.S