qemu/hw/misc/macio
Thomas Huth ddd835f32a hw/misc/macio: Fix crash when listing device properties of macio device
The macio-newworld device can currently be used to abort QEMU unexpectedly:

$ ppc-softmmu/qemu-system-ppc -S -M ref405ep,accel=qtest -qmp stdio
{"QMP": {"version": {"qemu": {"micro": 50, "minor": 11, "major": 2},
 "package": "build-all"}, "capabilities": []}}
{ 'execute': 'qmp_capabilities' }
{"return": {}}
{ 'execute': 'device-list-properties',
  'arguments': {'typename': 'macio-newworld'}}
Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222:
Device 'serial0' is in use
Aborted (core dumped)

qdev properties should be set during realize(), not during instance_init(),
so move the related code there to fix this problem.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-04-10 10:05:38 +10:00
..
cuda.c cuda: convert to trace-events 2018-02-16 12:14:26 +11:00
mac_dbdma.c maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
macio.c hw/misc/macio: Fix crash when listing device properties of macio device 2018-04-10 10:05:38 +10:00
Makefile.objs hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
trace-events cuda: convert to trace-events 2018-02-16 12:14:26 +11:00