mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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>
This commit is contained in:
parent
0da41d3c5a
commit
d1214b819f
4 changed files with 19 additions and 2 deletions
|
@ -1714,12 +1714,19 @@ void xive_router_notify(XiveNotifier *xn, uint32_t lisn)
|
|||
xive_get_field64(EAS_END_DATA, eas.w));
|
||||
}
|
||||
|
||||
static Property xive_router_properties[] = {
|
||||
DEFINE_PROP_LINK("xive-fabric", XiveRouter, xfb,
|
||||
TYPE_XIVE_FABRIC, XiveFabric *),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void xive_router_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
XiveNotifierClass *xnc = XIVE_NOTIFIER_CLASS(klass);
|
||||
|
||||
dc->desc = "XIVE Router Engine";
|
||||
dc->props = xive_router_properties;
|
||||
xnc->notify = xive_router_notify;
|
||||
}
|
||||
|
||||
|
@ -1727,6 +1734,7 @@ static const TypeInfo xive_router_info = {
|
|||
.name = TYPE_XIVE_ROUTER,
|
||||
.parent = TYPE_SYS_BUS_DEVICE,
|
||||
.abstract = true,
|
||||
.instance_size = sizeof(XiveRouter),
|
||||
.class_size = sizeof(XiveRouterClass),
|
||||
.class_init = xive_router_class_init,
|
||||
.interfaces = (InterfaceInfo[]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue