From: Thomas Huth Date: Tue, 30 Apr 2024 19:08:43 +0000 (+0200) Subject: hw/s390x: Attach the sclpconsole to /machine/sclp/s390-sclp-event-facility X-Git-Tag: pull-vmclock-20250108~324^2~7 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c990c1f35b80de53570f11433d71624aca185763;p=users%2Fdwmw2%2Fqemu.git hw/s390x: Attach the sclpconsole to /machine/sclp/s390-sclp-event-facility The sclpconsole currently does not have a proper parent in the QOM tree, so it shows up under /machine/unattached - which is somewhat ugly. We should rather attach it to /machine/sclp/s390-sclp-event-facility where the other devices of type TYPE_SCLP_EVENT already reside. Message-ID: <20240430190843.453903-1-thuth@redhat.com> Reviewed-by: Eric Farman Reviewed-by: Cédric Le Goater Reviewed-by: David Hildenbrand Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 4dcc213820..726c2ab436 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -239,11 +239,13 @@ static void s390_create_virtio_net(BusState *bus, const char *name) static void s390_create_sclpconsole(const char *type, Chardev *chardev) { + BusState *ev_fac_bus = sclp_get_event_facility_bus(); DeviceState *dev; dev = qdev_new(type); + object_property_add_child(OBJECT(ev_fac_bus->parent), type, OBJECT(dev)); qdev_prop_set_chr(dev, "chardev", chardev); - qdev_realize_and_unref(dev, sclp_get_event_facility_bus(), &error_fatal); + qdev_realize_and_unref(dev, ev_fac_bus, &error_fatal); } static void ccw_init(MachineState *machine)