xive: add a get_tctx() method to the XiveRouter
commit40a5056c4130efc60ab0639e93d6d0c509326e8a
authorCédric Le Goater <clg@kaod.org>
Thu, 17 Jan 2019 07:53:24 +0000 (17 08:53 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 4 Feb 2019 07:44:18 +0000 (4 18:44 +1100)
tree309997620c372aeca337d2170508b4010512b432
parentd8e81d6e6093738c23b457b607c44a75a6952dc8
xive: add a get_tctx() method to the XiveRouter

It provides a mean to retrieve the XiveTCTX of a CPU. This will become
necessary with future changes which move the interrupt presenter
object pointers under the PowerPCCPU machine_data.

The PowerNV machine has an extra requirement on TIMA accesses that
this new method addresses. The machine can perform indirect loads and
stores on the TIMA on behalf of another CPU. The PIR being defined in
the controller registers, we need a way to peek in the controller
model to find the PIR value.

The XiveTCTX is moved above the XiveRouter definition to avoid forward
typedef declarations.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/intc/spapr_xive.c
hw/intc/xive.c
include/hw/ppc/xive.h