summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2020-01-06 15:56:37 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2020-01-08 11:01:59 +1100
commitd1214b819f26dcf95329af624e74bf42eeeb1a9a (patch)
tree38e7e8832da82cb6ba565644d598f4ff975eb5a2 /include
parent0da41d3c5af7897e742c2fa4f6a5c5609b86c493 (diff)
downloadqemu-d1214b819f26dcf95329af624e74bf42eeeb1a9a.zip
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 <groug@kaod.org> Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20200106145645.4539-5-clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include')
-rw-r--r--include/hw/ppc/xive.h5
1 files changed, 3 insertions, 2 deletions
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)