qemu/scripts
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
..
2017-03-03 16:40:02 +01:00
2017-07-20 09:56:41 +02:00
2012-03-30 08:14:11 -05:00
2017-07-11 17:42:49 +03:00
2015-10-12 18:44:54 +02:00
2017-09-04 13:09:13 +02:00
2015-10-29 17:59:27 +00:00
2017-09-05 10:32:06 +01:00
2016-07-26 18:28:40 +02:00
2017-05-19 12:29:01 +02:00