diff options
author | Greg Kurz <groug@kaod.org> | 2019-11-15 16:55:37 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-12-17 10:39:47 +1100 |
commit | 0ab2316e9e605af500fcefc60e39c8dc62fbd161 (patch) | |
tree | 328f4637347a30c3400879e18b7cff67cf4ef1b5 /hw/intc/spapr_xive.c | |
parent | 82ea3a1b291527ef67315f00e50cbbc105b7d739 (diff) |
xive: Link "xive" property to XiveEndSource::xrtr pointer
The END source object has both a pointer and a "xive" property pointing to
the router 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: <157383333784.165747.5298512574054268786.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/intc/spapr_xive.c')
-rw-r--r-- | hw/intc/spapr_xive.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index 10890aeeeb..729246e906 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -290,8 +290,8 @@ static void spapr_xive_realize(DeviceState *dev, Error **errp) */ object_property_set_int(OBJECT(end_xsrc), xive->nr_irqs, "nr-ends", &error_fatal); - object_property_add_const_link(OBJECT(end_xsrc), "xive", OBJECT(xive), - &error_fatal); + object_property_set_link(OBJECT(end_xsrc), OBJECT(xive), "xive", + &error_abort); object_property_set_bool(OBJECT(end_xsrc), true, "realized", &local_err); if (local_err) { error_propagate(errp, local_err); |