qemu/hw/sparc64
Thomas Huth 92b19880f7 hw/sparc64/sun4u: Fix introspection by converting prom instance_init to realize
The instance_init function of devices should always succeed to be able
to introspect the device. However, the instance_init function of the
"openprom" device can currently fail, for example like this:

$ echo "{'execute':'qmp_capabilities'}"\
       "{'execute':'device-list-properties',"\
       " 'arguments':{'typename':'openprom'}}" \
       | sparc64-softmmu/qemu-system-sparc64 -M sun4v,accel=qtest -qmp stdio
{"QMP": {"version": {"qemu": {"micro": 91, "minor": 11, "major": 2},
 "package": "build-all"}, "capabilities": []}}
{"return": {}}
RAMBlock "sun4u.prom" already registered, abort!
Aborted (core dumped)

This should not happen. Fix this problem by moving the affected code from
instance_init into a realize function instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2018-06-17 11:12:41 +01:00
..
Makefile.objs sun4u: split IOMMU device out from apb.c to sun4u_iommu.c 2018-01-09 21:48:20 +00:00
niagara.c Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
sparc64.c sparc64: convert hw/sparc64/sparc64.c from DPRINTF macros to trace events 2018-01-25 13:39:34 +00:00
sun4u_iommu.c iommu: Add IOMMU index argument to translate method 2018-06-15 15:23:34 +01:00
sun4u.c hw/sparc64/sun4u: Fix introspection by converting prom instance_init to realize 2018-06-17 11:12:41 +01:00
trace-events sparc64: convert hw/sparc64/sparc64.c from DPRINTF macros to trace events 2018-01-25 13:39:34 +00:00