]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/ppc/e500: Check for compatible CPU type instead of aborting ungracefully
authorThomas Huth <thuth@redhat.com>
Wed, 15 Oct 2025 11:12:43 +0000 (13:12 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 21 Oct 2025 18:09:57 +0000 (20:09 +0200)
commit270b28681e369082dc17f58eae2871b75d3e8e6c
tree26642ed63ce9d4bdbdb17dbdb7a09e86f14e4795
parent40eed74cc9deaa4343b31e49a6fbf7f037e8d841
hw/ppc/e500: Check for compatible CPU type instead of aborting ungracefully

When using the ppce500 machine with an embedded CPU type that has
the right MMU model, but is not part of the e500 CPU family, QEMU
currently aborts ungracefully:

 $ ./qemu-system-ppc -machine ppce500 -cpu e200z5 -nographic
 qemu-system-ppc: ../qemu/hw/core/gpio.c:108: qdev_get_gpio_in_named:
  Assertion `n >= 0 && n < gpio_list->num_in' failed.
 Aborted (core dumped)

The ppce500 machine expects a CPU with certain GPIO interrupt pins,
so let's replace the coarse check for the MMU_BOOKE206 model with
a more precise check that only allows CPUs from the e500 family.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3162
Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-ID: <20251015111243.1585018-1-thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/ppc/e500.c