qemu-e2k/hw/ppc
Thomas Huth 2363d5ee23 hw/ppc/spapr_cpu_core: Add a proper check for spapr machine
QEMU currently crashes when the user tries to add a spapr-cpu-core
on a non-pseries machine:

$ qemu-system-ppc64 -S -machine ppce500,accel=tcg \
                    -device POWER5+_v2.1-spapr-cpu-core
hw/ppc/spapr_cpu_core.c:178:spapr_cpu_core_realize_child:
Object 0x55cee1f55160 is not an instance of type spapr-machine
Aborted (core dumped)

So let's add a proper check for the correct machine time with
a more friendly error message here.

Reported-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-09-08 09:30:55 +10:00
..
e500-ccsr.h
e500.c e500: Use cpu_index instead of vcpu_dt_id 2017-09-08 09:30:55 +10:00
e500.h
e500plat.c
fdt.c
mac_newworld.c ppc: replace cpu_ppc_init() with cpu_generic_init() 2017-09-01 11:54:25 -03:00
mac_oldworld.c ppc: replace cpu_ppc_init() with cpu_generic_init() 2017-09-01 11:54:25 -03:00
mac.h
Makefile.objs ppc4xx_i2c: Move to hw/i2c 2017-09-08 09:30:55 +10:00
mpc8544_guts.c
mpc8544ds.c
pnv_bmc.c
pnv_core.c
pnv_lpc.c
pnv_occ.c
pnv_psi.c
pnv_xscom.c
pnv.c
ppc4xx_devs.c ppc4xx: Make MAL emulation more generic 2017-09-08 09:30:55 +10:00
ppc4xx_pci.c
ppc405_boards.c
ppc405_uc.c ppc4xx: Export ECB and PLB emulation 2017-09-08 09:30:55 +10:00
ppc405.h ppc4xx: Export ECB and PLB emulation 2017-09-08 09:30:55 +10:00
ppc440_bamboo.c ppc: replace cpu_ppc_init() with cpu_generic_init() 2017-09-01 11:54:25 -03:00
ppc_booke.c
ppc.c ppc: spapr: Make VCPU ID handling private to SPAPR 2017-09-08 09:30:55 +10:00
ppce500_spin.c
prep_systemio.c
prep.c ppc: replace cpu_ppc_init() with cpu_generic_init() 2017-09-01 11:54:25 -03:00
rs6000_mc.c
spapr_cpu_core.c hw/ppc/spapr_cpu_core: Add a proper check for spapr machine 2017-09-08 09:30:55 +10:00
spapr_drc.c spapr_drc: pass object ownership to parent/owner 2017-09-08 09:30:54 +10:00
spapr_events.c hw/ppc: clear pending_events on machine reset 2017-09-08 09:30:54 +10:00
spapr_hcall.c ppc: spapr: Make VCPU ID handling private to SPAPR 2017-09-08 09:30:55 +10:00
spapr_iommu.c spapr_iommu: Realloc guest visible TCE table when hot(un)plugging vfio-pci 2017-09-08 09:30:55 +10:00
spapr_ovec.c
spapr_pci_vfio.c
spapr_pci.c spapr_pci: parent the MSI memory region to the PHB 2017-09-08 09:30:54 +10:00
spapr_rng.c
spapr_rtas_ddw.c
spapr_rtas.c ppc: spapr: Make VCPU ID handling private to SPAPR 2017-09-08 09:30:55 +10:00
spapr_rtc.c hw/ppc/spapr_rtc: Mark the RTC device with user_creatable = false 2017-08-22 21:26:46 +10:00
spapr_vio.c
spapr.c ppc: spapr: Make VCPU ID handling private to SPAPR 2017-09-08 09:30:55 +10:00
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
virtex_ml507.c ppc: replace cpu_ppc_init() with cpu_generic_init() 2017-09-01 11:54:25 -03:00