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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- hw/ppc/spapr_irq.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/ppc/spapr_irq.c') diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c index 373505d..1f630f2 100644 --- a/hw/ppc/spapr_irq.c +++ b/hw/ppc/spapr_irq.c @@ -332,6 +332,8 @@ void spapr_irq_init(SpaprMachineState *spapr, Error **errp) * priority */ qdev_prop_set_uint32(dev, "nr-ends", nr_servers << 3); + object_property_set_link(OBJECT(dev), OBJECT(spapr), "xive-fabric", + &error_abort); qdev_init_nofail(dev); spapr->xive = SPAPR_XIVE(dev); -- cgit v1.1