powerpc/icp-opal: Fix missing KVM case and harden replay
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 16 Jan 2017 17:58:53 +0000 (11:58 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jan 2017 07:24:39 +0000 (08:24 +0100)
commit09187cdf50c17a5f537b78a3154c4b1014d9a36e
tree751dfae449e85e244c20a679bd15b9c7279d31c2
parent26c4d513b6af730941bb4ff4c237789a4d190c27
powerpc/icp-opal: Fix missing KVM case and harden replay

commit 9728a7c8ab2f7a1c8d5c95278d2e4f4ac1285385 upstream.

The icp-opal call is missing the code from icp-native to recover
interrupts snatched by KVM. Without that, when running KVM, we can
get into a situation where an interrupt is lost and the CPU stuck
with an elevated CPPR.

Also harden replay by always checking the return from opal_int_eoi().

Fixes: d74361881f0d ("powerpc/xics: Add ICP OPAL backend")
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/sysdev/xics/icp-opal.c