@samitouri / QOSamiQemu / commits / 44adb5fcc2

target/riscv: Remove spike as default machine

In QEMU 10.0 we deprecated the default spike machine, let's finally remove spike as the default and require users to specify the machine. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com> Message-ID: <20260430052218.771358-2-alistair.francis@wdc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

Alistair Francis committed Apr 30, 2026 at 15:22 UTC 44adb5fcc20d38adba47a0d486b6e6ff14b44154
3 files changed +14 -19
docs/about/deprecated.rst
-18
@@ -243,24 +243,6 @@ better reflects the way this property affects all random data within
243 the device tree blob, not just the ``kaslr-seed`` node.
244
245
246 -RISC-V default machine option (since 10.0)
247 -''''''''''''''''''''''''''''''''''''''''''
248 -
249 -RISC-V defines ``spike`` as the default machine if no machine option is
250 -given in the command line. This happens because ``spike`` is the first
251 -RISC-V machine implemented in QEMU and setting it as default was
252 -convenient at that time. Now we have 7 riscv64 and 6 riscv32 machines
253 -and having ``spike`` as a default is no longer justified. This default
254 -will also promote situations where users think they're running ``virt``
255 -(the most used RISC-V machine type in 10.0) when in fact they're
256 -running ``spike``.
257 -
258 -Removing the default machine option forces users to always set the machine
259 -they want to use and avoids confusion. Existing users of the ``spike``
260 -machine must ensure that they're setting the ``spike`` machine in the
261 -command line (``-M spike``).
262 -
263 -
246 Backend options
247 ---------------
248
docs/about/removed-features.rst
+14
@@ -1229,6 +1229,20 @@ firmware is available to boot it. It can be replaced by the
1229 ``ast2700fc``, another multi-SoC machine based on the newer AST2700
1230 SoCs which are excepted to receive better support in the future.
1231
1232 +RISC-V default machine (removed in 11.1)
1233 +''''''''''''''''''''''''''''''''''''''''
1234 +
1235 +RISC-V used to define ``spike`` as the default machine if no machine option
1236 +was given via the command line. This happend because ``spike`` was the first
1237 +RISC-V machine implemented in QEMU and setting it as default was
1238 +convenient at that time. Now we have 7 riscv64 and 6 riscv32 machines
1239 +and having ``spike`` as a default is no longer justified.
1240 +
1241 +The default machine option has been removed, forcing users to always set the
1242 +machine they want to use to avoid confusion. Existing users of the ``spike``
1243 +machine must ensure that they're setting the ``spike`` machine in the
1244 +command line (``-M spike``).
1245 +
1246 linux-user mode CPUs
1247 --------------------
1248
hw/riscv/spike.c
-1
@@ -341,7 +341,6 @@ static void spike_machine_class_init(ObjectClass *oc, const void *data)
341 mc->desc = "RISC-V Spike board";
342 mc->init = spike_board_init;
343 mc->max_cpus = SPIKE_CPUS_MAX;
344 - mc->is_default = true;
344 mc->default_cpu_type = TYPE_RISCV_CPU_BASE;
345 mc->possible_cpu_arch_ids = riscv_numa_possible_cpu_arch_ids;
346 mc->cpu_index_to_instance_props = riscv_numa_cpu_index_to_props;