qemu-patch-raspberry4/hw/s390x
Markus Armbruster 1afec9e8ea s390x/event-facility: Simplify creation of SCLP event devices
init_event_facility() creates the SCLP events bus with two SCLP event
devices (sclpquiesce and sclp-cpu-hotplug).  It leaves the devices
unrealized.  A comment explains they will be realized "via the bus".

The bus's realize method sclp_events_bus_realize() indeed realizes all
unrealized devices on this bus.  It carries a TODO comment claiming
this "has to be done in common code".  No other bus realize method
realizes its devices.

The common code in question is bus_set_realized(), which has a TODO
comment asking for recursive realization.  It's been asking for years.

The only devices sclp_events_bus_realize() will ever realize are the
two init_event_facility() puts there.

Simplify as follows:

* Make the devices members of the event facility instance struct, just
  like the bus.  object_initialize_child() is simpler than
  object_property_add_child() and object_unref().

* Realize them in the event facility realize method.

This is in line with how such things are done elsewhere.

Cc: Cornelia Huck <cohuck@redhat.com>
Cc: Halil Pasic <pasic@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: David Hildenbrand <david@redhat.com>
Cc: qemu-s390x@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-54-armbru@redhat.com>
2020-06-15 22:06:04 +02:00
..
3270-ccw.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
ap-bridge.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
ap-device.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
ccw-device.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
ccw-device.h s390x: vmstatify config migration for virtio-ccw 2017-07-05 12:16:55 +02:00
css-bridge.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
css.c Avoid address_space_rw() with a constant is_write argument 2020-02-20 14:47:08 +01:00
event-facility.c s390x/event-facility: Simplify creation of SCLP event devices 2020-06-15 22:06:04 +02:00
ipl.c s390x: protvirt: Support unpack facility 2020-04-29 14:30:54 +02:00
ipl.h s390x/s390-virtio-ccw: Fix build on systems without KVM 2020-04-29 14:36:19 +02:00
Kconfig kconfig: add CONFIG_MSI_NONBROKEN 2019-03-18 09:39:57 +01:00
Makefile.objs s390x: protvirt: Support unpack facility 2020-04-29 14:30:54 +02:00
pv.c s390x: pv: Fix KVM_PV_PREP_RESET command wrapper name 2020-06-05 17:13:11 +02:00
s390-ccw.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
s390-pci-bus.c qdev: Convert uses of qdev_create() manually 2020-06-15 22:05:08 +02:00
s390-pci-bus.h s390x/pci: Drop release timer and replace it with a flag 2019-02-04 13:47:50 +01:00
s390-pci-inst.c add device_legacy_reset function to prepare for reset api change 2020-01-30 16:02:03 +00:00
s390-pci-inst.h s390x/pci: add common function measurement block 2019-01-18 11:52:01 +01:00
s390-skeys-kvm.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
s390-skeys.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
s390-stattrib-kvm.c vl/s390x: fixup ram sizes for compat machines 2020-04-02 17:10:09 +02:00
s390-stattrib.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
s390-virtio-ccw.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
s390-virtio-hcall.c s390x: rename s390-virtio.h to s390-virtio-hcall.h 2017-09-19 18:31:31 +02:00
s390-virtio-hcall.h s390/kvm_virtio/linux-headers: remove traces of old virtio transport 2017-11-24 10:52:05 +01:00
sclp.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
sclpcpu.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
sclpquiesce.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
tod-kvm.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
tod-qemu.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
tod.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
trace-events trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
vhost-vsock-ccw.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-9p.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-balloon.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-blk.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-crypto.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-gpu.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-input.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-net.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-rng.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-scsi.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-serial.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
virtio-ccw.h qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00