qemu-e2k/hw/arm
Thomas Huth f640a5914f hw/arm/fsl-imx: Fix introspection problem with fsl-imx6 and fsl-imx7
QEMU currently exits unexpectedly when trying to introspect the fsl-imx6
and fsl-imx7 devices on systems with many SMP CPUs:

$ echo "{'execute':'qmp_capabilities'}"\
       "{'execute':'device-list-properties',"\
       " 'arguments':{'typename':'fsl,imx6'}}" \
       | arm-softmmu/qemu-system-arm -M virt,accel=qtest -qmp stdio -smp 8
{"QMP": {"version": {"qemu": {"micro": 91, "minor": 11, "major": 2},
 "package": "build-all"}, "capabilities": []}}
{"return": {}}
fsl,imx6: Only 4 CPUs are supported (8 requested)

And:

$ echo "{'execute':'qmp_capabilities'}"\
       "{'execute':'device-list-properties',"\
       " 'arguments':{'typename':'fsl,imx7'}}" \
       | arm-softmmu/qemu-system-arm -M raspi2,accel=qtest -qmp stdio
{"QMP": {"version": {"qemu": {"micro": 91, "minor": 11, "major": 2},
 "package": "build-all"}, "capabilities": []}}
{"return": {}}
fsl,imx7: Only 2 CPUs are supported (4 requested)

This happens because these devices are doing an exit() from their
instance_init function - which should never be done since instance_init
can be called at any time for device introspection! Fix it by moving
the deadly check into the realize() function instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-id: 1522908551-14885-1-git-send-email-thuth@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-10 13:02:25 +01:00
..
allwinner-a10.c hw/arm/allwinner-a10: Do not use nd_table in instance_init function 2018-04-10 13:02:25 +01:00
armv7m.c
aspeed_soc.c
aspeed.c
bcm2835_peripherals.c
bcm2836.c hw/arm/bcm2836: Use the Cortex-A7 instead of Cortex-A15 2018-03-23 18:26:45 +00:00
boot.c hw/arm: Allow manually specified /psci node 2018-04-10 13:02:24 +01:00
collie.c
cubieboard.c
digic_boards.c
digic.c
exynos4_boards.c
exynos4210.c
fsl-imx6.c hw/arm/fsl-imx: Fix introspection problem with fsl-imx6 and fsl-imx7 2018-04-10 13:02:25 +01:00
fsl-imx7.c hw/arm/fsl-imx: Fix introspection problem with fsl-imx6 and fsl-imx7 2018-04-10 13:02:25 +01:00
fsl-imx25.c
fsl-imx31.c
gumstix.c
highbank.c
imx25_pdk.c
integratorcp.c hw/arm/integratorcp: Don't do things that could be fatal in the instance_init 2018-04-10 13:02:24 +01:00
iotkit.c
kzm.c
mainstone.c
Makefile.objs
mcimx7d-sabre.c
mps2-tz.c
mps2.c
msf2-soc.c
msf2-som.c
musicpal.c
netduino2.c
nseries.c
omap1.c
omap2.c
omap_sx1.c
palm.c
pxa2xx_gpio.c
pxa2xx_pic.c
pxa2xx.c
raspi.c hw/arm/bcm2836: Use the Cortex-A7 instead of Cortex-A15 2018-03-23 18:26:45 +00:00
realview.c
sabrelite.c
spitz.c
stellaris.c
stm32f205_soc.c
strongarm.c
strongarm.h
sysbus-fdt.c
tosa.c
trace-events
versatilepb.c
vexpress.c
virt-acpi-build.c
virt.c mach-virt: Set VM's SMBIOS system version to mc->name 2018-03-23 18:26:46 +00:00
xilinx_zynq.c
xlnx-zcu102.c
xlnx-zynqmp.c
z2.c