diff options
author | Greg Kurz | 2019-11-18 00:20:36 +0100 |
---|---|---|
committer | David Gibson | 2019-12-17 00:39:47 +0100 |
commit | b015a9809427c87940447e5b76a5b73a0bf27d7c (patch) | |
tree | 337897be9c51a38459719730331b3feaa30118a4 /hw/ppc/pnv_psi.c | |
parent | ppc/pnv: Link "chip" property to PnvXive::chip pointer (diff) | |
download | qemu-b015a9809427c87940447e5b76a5b73a0bf27d7c.tar.gz qemu-b015a9809427c87940447e5b76a5b73a0bf27d7c.tar.xz qemu-b015a9809427c87940447e5b76a5b73a0bf27d7c.zip |
xics: Link ICS_PROP_XICS property to ICSState::xics pointer
The ICS object has both a pointer and an ICS_PROP_XICS property pointing
to the XICS fabric. Confusing bugs could arise if these ever go out of
sync.
Change the property definition so that it explicitely sets the pointer.
The property isn't optional : not being able to set the link is a bug
and QEMU should rather abort than exit in this case.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <157403283596.409804.17347207690271971987.stgit@bahia.lan>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/pnv_psi.c')
-rw-r--r-- | hw/ppc/pnv_psi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index a360515a86..7e725aaf2b 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -497,8 +497,7 @@ static void pnv_psi_power8_realize(DeviceState *dev, Error **errp) } /* Create PSI interrupt control source */ - object_property_add_const_link(OBJECT(ics), ICS_PROP_XICS, obj, - &error_abort); + object_property_set_link(OBJECT(ics), obj, ICS_PROP_XICS, &error_abort); object_property_set_int(OBJECT(ics), PSI_NUM_INTERRUPTS, "nr-irqs", &err); if (err) { error_propagate(errp, err); |