mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
97c2acb550
commit
2363d5ee23
2 changed files with 8 additions and 0 deletions
|
@ -160,6 +160,9 @@ ERROR_WHITELIST = [
|
|||
{'machine':'q35|pc.*', 'device':'kvm-ioapic', 'expected':True}, # Only 1 ioapics allowed
|
||||
{'machine':'q35|pc.*', 'device':'ioapic', 'expected':True}, # Only 1 ioapics allowed
|
||||
|
||||
# "spapr-cpu-core needs a pseries machine"
|
||||
{'machine':'(?!pseries).*', 'device':'.*-spapr-cpu-core', 'expected':True},
|
||||
|
||||
# KVM-specific devices shouldn't be tried without accel=kvm:
|
||||
{'accel':'(?!kvm).*', 'device':'kvmclock', 'expected':True},
|
||||
{'accel':'(?!kvm).*', 'device':'kvm-pci-assign', 'expected':True},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue