From d1214b819f26dcf95329af624e74bf42eeeb1a9a Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Mon, 6 Jan 2020 15:56:37 +0100 Subject: spapr, pnv, xive: Add a "xive-fabric" link to the XIVE router In order to get rid of qdev_get_machine(), first add a pointer to the XIVE fabric under the XIVE router and make it configurable through a QOM link property. Configure it in the spapr and pnv machine. In the case of pnv, the XIVE routers are under the chip, so this is done with a QOM alias property of the POWER9 pnv chip. Signed-off-by: Greg Kurz Signed-off-by: Cédric Le Goater Message-Id: <20200106145645.4539-5-clg@kaod.org> Signed-off-by: David Gibson --- include/hw/ppc/xive.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h index 1b7b89098f..1ded82b1cd 100644 --- a/include/hw/ppc/xive.h +++ b/include/hw/ppc/xive.h @@ -324,9 +324,12 @@ typedef struct XiveTCTX { /* * XIVE Router */ +typedef struct XiveFabric XiveFabric; typedef struct XiveRouter { SysBusDevice parent; + + XiveFabric *xfb; } XiveRouter; #define TYPE_XIVE_ROUTER "xive-router" @@ -402,8 +405,6 @@ int xive_presenter_tctx_match(XivePresenter *xptr, XiveTCTX *tctx, * XIVE Fabric (Interface between Interrupt Controller and Machine) */ -typedef struct XiveFabric XiveFabric; - #define TYPE_XIVE_FABRIC "xive-fabric" #define XIVE_FABRIC(obj) \ INTERFACE_CHECK(XiveFabric, (obj), TYPE_XIVE_FABRIC) -- cgit v1.2.3-55-g7522