powerpc/xive: Use hw CPU ids when configuring the CPU queues
authorCédric Le Goater <clg@kaod.org>
Tue, 13 Feb 2018 08:47:12 +0000 (09:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Feb 2018 14:42:16 +0000 (15:42 +0100)
commit3b09911d3beb326a117bfb05c717c3021e5458ca
treed77d9e9f1f816fe694213b6710ac63b3398af398
parent892674b5058a2b15d35d1185f5d09d8f4c257a7e
powerpc/xive: Use hw CPU ids when configuring the CPU queues

commit 8e036c8d30a2cd9d8fc7442fbf6824e0a3e986e7 upstream.

The CPU event notification queues on sPAPR should be configured using
a hardware CPU identifier.

The problem did not show up on the Power Hypervisor because pHyp
supports 8 threads per core which keeps CPU number contiguous. This is
not the case on all sPAPR virtual machines, some use SMT=1.

Also improve error logging by adding the CPU number.

Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller")
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/sysdev/xive/spapr.c