summaryrefslogtreecommitdiffstats
path: root/hw/ppc/pnv_psi.c
diff options
context:
space:
mode:
authorGreg Kurz2019-11-15 16:55:32 +0100
committerDavid Gibson2019-12-17 00:39:47 +0100
commit82ea3a1b291527ef67315f00e50cbbc105b7d739 (patch)
tree210cbc9a4c611b155b89a178b4e7515aef508200 /hw/ppc/pnv_psi.c
parentxive: Link "cpu" property to XiveTCTX::cs pointer (diff)
downloadqemu-82ea3a1b291527ef67315f00e50cbbc105b7d739.tar.gz
qemu-82ea3a1b291527ef67315f00e50cbbc105b7d739.tar.xz
qemu-82ea3a1b291527ef67315f00e50cbbc105b7d739.zip
xive: Link "xive" property to XiveSource::xive pointer
The source object has both a pointer and a "xive" property pointing to the notifier object. 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: <157383333227.165747.12901571295951957951.stgit@bahia.lan> 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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c
index 68d0dfacfe..a360515a86 100644
--- a/hw/ppc/pnv_psi.c
+++ b/hw/ppc/pnv_psi.c
@@ -851,8 +851,7 @@ static void pnv_psi_power9_realize(DeviceState *dev, Error **errp)
&error_fatal);
object_property_set_int(OBJECT(xsrc), PSIHB9_NUM_IRQS, "nr-irqs",
&error_fatal);
- object_property_add_const_link(OBJECT(xsrc), "xive", OBJECT(psi),
- &error_fatal);
+ object_property_set_link(OBJECT(xsrc), OBJECT(psi), "xive", &error_abort);
object_property_set_bool(OBJECT(xsrc), true, "realized", &local_err);
if (local_err) {
error_propagate(errp, local_err);