From 0ab2316e9e605af500fcefc60e39c8dc62fbd161 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Fri, 15 Nov 2019 16:55:37 +0100 Subject: 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 Message-Id: <157383333784.165747.5298512574054268786.stgit@bahia.lan> Signed-off-by: David Gibson --- hw/intc/pnv_xive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/intc/pnv_xive.c') diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index 9e23dc7..6aa7aee 100644 --- a/hw/intc/pnv_xive.c +++ b/hw/intc/pnv_xive.c @@ -1705,8 +1705,8 @@ static void pnv_xive_realize(DeviceState *dev, Error **errp) object_property_set_int(OBJECT(end_xsrc), PNV_XIVE_NR_ENDS, "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); -- cgit v1.1