On 11/17/23 17:17, Philippe Mathieu-Daudé wrote:
The 'netduino2' machine ignores the CPU type requested by the
command line. This might confuse users, since the following will
create a machine with a Cortex-M3 CPU:

   $ qemu-system-arm -M netduino2 -cpu cortex-a9

Set the MachineClass::valid_cpu_types field (introduced in commit
c9cf636d48 "machine: Add a valid_cpu_types property").
Remove the now unused MachineClass::default_cpu_type field.

We now get:

   $ qemu-system-arm -M netduino2 -cpu cortex-a9
   qemu-system-arm: Invalid CPU type: cortex-a9-arm-cpu
   The valid types are: cortex-m3-arm-cpu

Since the SoC family can only use Cortex-M3 CPUs, hard-code the
CPU type name at the SoC level, removing the QOM property
entirely.

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
  include/hw/arm/stm32f205_soc.h | 4 ----
  hw/arm/netduino2.c             | 7 ++++++-
  hw/arm/stm32f205_soc.c         | 9 ++-------
  3 files changed, 8 insertions(+), 12 deletions(-)


Reviewed-by: Gavin Shan <gs...@redhat.com>


Reply via email to