hw/arm/exynos: Check for CPU types in machine_run_board_init()
commit56d69aaf511db5995f8939019c4373ebd04cde08
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 29 Jan 2024 15:18:21 +0000 (29 16:18 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 2 Feb 2024 13:51:58 +0000 (2 13:51 +0000)
tree0ba33214b67d2362ab64f35739e2920bd9241036
parentf57d3baa9c836c196f4164dde0d95ecee8d335dd
hw/arm/exynos: Check for CPU types in machine_run_board_init()

Restrict MachineClass::valid_cpu_types[] to the single
valid CPU type.

Instead of ignoring invalid CPU type requested by the user:

  $ qemu-system-arm -M nuri -cpu cortex-a7 -S -monitor stdio
  QEMU 8.2.50 monitor - type 'help' for more information
  (qemu) info qom-tree
  /machine (nuri-machine)
    /soc (exynos4210)
      /cpu[0] (cortex-a9-arm-cpu)
      ...

We now display an error:

  $ qemu-system-arm -M nuri -cpu cortex-a7
  qemu-system-arm: Invalid CPU model: cortex-a7
  The only valid type is: cortex-a9

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Message-id: 20240129151828.59544-3-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/exynos4_boards.c