diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-01-25 06:55:44 +0100 |
|---|---|---|
| committer | Cédric Le Goater <clg@kaod.org> | 2024-02-01 08:13:30 +0100 |
| commit | dc13909ed03c05275deb32512e9d8f8e34d79c3b (patch) | |
| tree | c8782b82aef24eb3965411c40bf806f579e62142 /hw/arm/aspeed.c | |
| parent | d815649c512fc785508315ead66a43385cf55bfb (diff) | |
| download | focaccia-qemu-dc13909ed03c05275deb32512e9d8f8e34d79c3b.tar.gz focaccia-qemu-dc13909ed03c05275deb32512e9d8f8e34d79c3b.zip | |
hw/arm/aspeed: Check for CPU types in machine_run_board_init()
Aspeed SoCs use a single CPU type (set as AspeedSoCClass::cpu_type).
Convert it to a NULL-terminated array (of a single non-NULL element).
Set MachineClass::valid_cpu_types[] to use the common machine code
to provide hints when the requested CPU is invalid (see commit
e702cbc19e ("machine: Improve is_cpu_type_supported()").
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/arm/aspeed.c')
| -rw-r--r-- | hw/arm/aspeed.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index d2d490a6d1..fc8355cdce 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -1149,6 +1149,7 @@ static void aspeed_machine_class_init_cpus_defaults(MachineClass *mc) mc->default_cpus = sc->num_cpus; mc->min_cpus = sc->num_cpus; mc->max_cpus = sc->num_cpus; + mc->valid_cpu_types = sc->valid_cpu_types; } static void aspeed_machine_class_init(ObjectClass *oc, void *data) |