]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
hw/s390x: Attach the sclpconsole to /machine/sclp/s390-sclp-event-facility
authorThomas Huth <thuth@redhat.com>
Tue, 30 Apr 2024 19:08:43 +0000 (21:08 +0200)
committerThomas Huth <thuth@redhat.com>
Fri, 10 May 2024 04:23:56 +0000 (06:23 +0200)
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 <farman@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/s390x/s390-virtio-ccw.c

index 4dcc2138200fe160501fe6fd9931e8b71be3a8e0..726c2ab4363be30fe6b674d1ee697bb7d2e6352d 100644 (file)
@@ -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)