qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-10.0] docs: deprecate RISC-V default machine option
@ 2025-04-04 12:28 Daniel Henrique Barboza
  2025-04-04 13:07 ` Philippe Mathieu-Daudé
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Daniel Henrique Barboza @ 2025-04-04 12:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-riscv, alistair.francis, liwei1518, zhiwei_liu, palmer,
	Daniel Henrique Barboza, Philippe Mathieu-Daudé

Commit 5b4beba124 ("RISC-V Spike Machines") added the Spike machine and
made it default for qemu-system-riscv32/64. It was the first RISC-V
machine added in QEMU so setting it as default was sensible.

Today we have 7 riscv64 and 6 riscv32 machines and having 'spike' as
default machine is not intuitive. For example, [1] is a bug that was
opened with the 'virt' board in mind, but given that the user didn't
pass a '-machine' option, the user was using 'spike' without knowing.

Being explicit in the command line is desirable when we have a handful
of boards available, so deprecate the default machine setting from
RISC-V.

[1] https://gitlab.com/qemu-project/qemu/-/issues/2467

Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
---
 docs/about/deprecated.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 76291fdfd6..0f41a99c67 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -304,6 +304,23 @@ online to check that this board did not completely bitrot yet). It is
 recommended to use another MIPS machine for future MIPS code development
 instead.
 
+RISC-V default machine option (since 10.0)
+''''''''''''''''''''''''''''''''''''''''''
+
+RISC-V defines ``spike`` as the default machine if no machine option is
+given in the command line.  This happens because ``spike`` is the first
+RISC-V machine implemented in QEMU and setting it as default was
+convenient at that time.  Now we have 7 riscv64 and 6 riscv32 machines
+and having ``spike`` as a default is no longer justified.  This default
+will also promote situations where users think they're running ``virt``
+(the most used RISC-V machine type in 10.0) when in fact they're
+running ``spike``.
+
+Removing the default machine option forces users to always set the machine
+they want to use and avoids confusion.  Existing users of the ``spike``
+machine must ensure that they're setting the ``spike`` machine in the
+command line (``-M spike``).
+
 
 Backend options
 ---------------
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH for-10.0] docs: deprecate RISC-V default machine option
  2025-04-04 12:28 [PATCH for-10.0] docs: deprecate RISC-V default machine option Daniel Henrique Barboza
@ 2025-04-04 13:07 ` Philippe Mathieu-Daudé
  2025-04-04 13:14   ` Daniel Henrique Barboza
  2025-04-04 14:09 ` Richard Henderson
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-04-04 13:07 UTC (permalink / raw)
  To: Daniel Henrique Barboza, qemu-devel
  Cc: qemu-riscv, alistair.francis, liwei1518, zhiwei_liu, palmer

On 4/4/25 14:28, Daniel Henrique Barboza wrote:
> Commit 5b4beba124 ("RISC-V Spike Machines") added the Spike machine and
> made it default for qemu-system-riscv32/64. It was the first RISC-V
> machine added in QEMU so setting it as default was sensible.
> 
> Today we have 7 riscv64 and 6 riscv32 machines and having 'spike' as
> default machine is not intuitive. For example, [1] is a bug that was
> opened with the 'virt' board in mind, but given that the user didn't
> pass a '-machine' option, the user was using 'spike' without knowing.
> 
> Being explicit in the command line is desirable when we have a handful
> of boards available, so deprecate the default machine setting from
> RISC-V.
> 
> [1] https://gitlab.com/qemu-project/qemu/-/issues/2467
> 
> Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
> ---
>   docs/about/deprecated.rst | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
> 
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index 76291fdfd6..0f41a99c67 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -304,6 +304,23 @@ online to check that this board did not completely bitrot yet). It is
>   recommended to use another MIPS machine for future MIPS code development
>   instead.
>   
> +RISC-V default machine option (since 10.0)
> +''''''''''''''''''''''''''''''''''''''''''
> +
> +RISC-V defines ``spike`` as the default machine if no machine option is
> +given in the command line.  This happens because ``spike`` is the first
> +RISC-V machine implemented in QEMU and setting it as default was
> +convenient at that time.  Now we have 7 riscv64 and 6 riscv32 machines
> +and having ``spike`` as a default is no longer justified.  This default
> +will also promote situations where users think they're running ``virt``
> +(the most used RISC-V machine type in 10.0) when in fact they're
> +running ``spike``.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Having users specify "-M virt" doesn't seem much of a hassle IMHO,
so I'd not use 'virt' as the /new/ default in 10.2 (but we aren't
there yet).

> +
> +Removing the default machine option forces users to always set the machine
> +they want to use and avoids confusion.  Existing users of the ``spike``
> +machine must ensure that they're setting the ``spike`` machine in the
> +command line (``-M spike``).
> +


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH for-10.0] docs: deprecate RISC-V default machine option
  2025-04-04 13:07 ` Philippe Mathieu-Daudé
@ 2025-04-04 13:14   ` Daniel Henrique Barboza
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Henrique Barboza @ 2025-04-04 13:14 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: qemu-riscv, alistair.francis, liwei1518, zhiwei_liu, palmer



On 4/4/25 10:07 AM, Philippe Mathieu-Daudé wrote:
> On 4/4/25 14:28, Daniel Henrique Barboza wrote:
>> Commit 5b4beba124 ("RISC-V Spike Machines") added the Spike machine and
>> made it default for qemu-system-riscv32/64. It was the first RISC-V
>> machine added in QEMU so setting it as default was sensible.
>>
>> Today we have 7 riscv64 and 6 riscv32 machines and having 'spike' as
>> default machine is not intuitive. For example, [1] is a bug that was
>> opened with the 'virt' board in mind, but given that the user didn't
>> pass a '-machine' option, the user was using 'spike' without knowing.
>>
>> Being explicit in the command line is desirable when we have a handful
>> of boards available, so deprecate the default machine setting from
>> RISC-V.
>>
>> [1] https://gitlab.com/qemu-project/qemu/-/issues/2467
>>
>> Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
>> ---
>>   docs/about/deprecated.rst | 17 +++++++++++++++++
>>   1 file changed, 17 insertions(+)
>>
>> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
>> index 76291fdfd6..0f41a99c67 100644
>> --- a/docs/about/deprecated.rst
>> +++ b/docs/about/deprecated.rst
>> @@ -304,6 +304,23 @@ online to check that this board did not completely bitrot yet). It is
>>   recommended to use another MIPS machine for future MIPS code development
>>   instead.
>> +RISC-V default machine option (since 10.0)
>> +''''''''''''''''''''''''''''''''''''''''''
>> +
>> +RISC-V defines ``spike`` as the default machine if no machine option is
>> +given in the command line.  This happens because ``spike`` is the first
>> +RISC-V machine implemented in QEMU and setting it as default was
>> +convenient at that time.  Now we have 7 riscv64 and 6 riscv32 machines
>> +and having ``spike`` as a default is no longer justified.  This default
>> +will also promote situations where users think they're running ``virt``
>> +(the most used RISC-V machine type in 10.0) when in fact they're
>> +running ``spike``.
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
> Having users specify "-M virt" doesn't seem much of a hassle IMHO,
> so I'd not use 'virt' as the /new/ default in 10.2 (but we aren't
> there yet).

The idea is to not have any default machine at all. Users will need to specify
"-M <machine_name>" in the command line for all RISC-V machines. Otherwise we
might run in the same problem again if another RISC-V board becomes more popular
than 'virt'.


Thanks,

Daniel

> 
>> +
>> +Removing the default machine option forces users to always set the machine
>> +they want to use and avoids confusion.  Existing users of the ``spike``
>> +machine must ensure that they're setting the ``spike`` machine in the
>> +command line (``-M spike``).
>> +



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH for-10.0] docs: deprecate RISC-V default machine option
  2025-04-04 12:28 [PATCH for-10.0] docs: deprecate RISC-V default machine option Daniel Henrique Barboza
  2025-04-04 13:07 ` Philippe Mathieu-Daudé
@ 2025-04-04 14:09 ` Richard Henderson
  2025-04-06 23:22 ` Alistair Francis
  2025-04-06 23:32 ` Alistair Francis
  3 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2025-04-04 14:09 UTC (permalink / raw)
  To: qemu-devel

On 4/4/25 05:28, Daniel Henrique Barboza wrote:
> Commit 5b4beba124 ("RISC-V Spike Machines") added the Spike machine and
> made it default for qemu-system-riscv32/64. It was the first RISC-V
> machine added in QEMU so setting it as default was sensible.
> 
> Today we have 7 riscv64 and 6 riscv32 machines and having 'spike' as
> default machine is not intuitive. For example, [1] is a bug that was
> opened with the 'virt' board in mind, but given that the user didn't
> pass a '-machine' option, the user was using 'spike' without knowing.
> 
> Being explicit in the command line is desirable when we have a handful
> of boards available, so deprecate the default machine setting from
> RISC-V.
> 
> [1]https://gitlab.com/qemu-project/qemu/-/issues/2467
> 
> Suggested-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> Signed-off-by: Daniel Henrique Barboza<dbarboza@ventanamicro.com>
> ---
>   docs/about/deprecated.rst | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH for-10.0] docs: deprecate RISC-V default machine option
  2025-04-04 12:28 [PATCH for-10.0] docs: deprecate RISC-V default machine option Daniel Henrique Barboza
  2025-04-04 13:07 ` Philippe Mathieu-Daudé
  2025-04-04 14:09 ` Richard Henderson
@ 2025-04-06 23:22 ` Alistair Francis
  2025-04-06 23:32 ` Alistair Francis
  3 siblings, 0 replies; 6+ messages in thread
From: Alistair Francis @ 2025-04-06 23:22 UTC (permalink / raw)
  To: Daniel Henrique Barboza
  Cc: qemu-devel, qemu-riscv, alistair.francis, liwei1518, zhiwei_liu,
	palmer, Philippe Mathieu-Daudé

On Fri, Apr 4, 2025 at 10:30 PM Daniel Henrique Barboza
<dbarboza@ventanamicro.com> wrote:
>
> Commit 5b4beba124 ("RISC-V Spike Machines") added the Spike machine and
> made it default for qemu-system-riscv32/64. It was the first RISC-V
> machine added in QEMU so setting it as default was sensible.
>
> Today we have 7 riscv64 and 6 riscv32 machines and having 'spike' as
> default machine is not intuitive. For example, [1] is a bug that was
> opened with the 'virt' board in mind, but given that the user didn't
> pass a '-machine' option, the user was using 'spike' without knowing.
>
> Being explicit in the command line is desirable when we have a handful
> of boards available, so deprecate the default machine setting from
> RISC-V.
>
> [1] https://gitlab.com/qemu-project/qemu/-/issues/2467
>
> Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  docs/about/deprecated.rst | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index 76291fdfd6..0f41a99c67 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -304,6 +304,23 @@ online to check that this board did not completely bitrot yet). It is
>  recommended to use another MIPS machine for future MIPS code development
>  instead.
>
> +RISC-V default machine option (since 10.0)
> +''''''''''''''''''''''''''''''''''''''''''
> +
> +RISC-V defines ``spike`` as the default machine if no machine option is
> +given in the command line.  This happens because ``spike`` is the first
> +RISC-V machine implemented in QEMU and setting it as default was
> +convenient at that time.  Now we have 7 riscv64 and 6 riscv32 machines
> +and having ``spike`` as a default is no longer justified.  This default
> +will also promote situations where users think they're running ``virt``
> +(the most used RISC-V machine type in 10.0) when in fact they're
> +running ``spike``.
> +
> +Removing the default machine option forces users to always set the machine
> +they want to use and avoids confusion.  Existing users of the ``spike``
> +machine must ensure that they're setting the ``spike`` machine in the
> +command line (``-M spike``).
> +
>
>  Backend options
>  ---------------
> --
> 2.49.0
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH for-10.0] docs: deprecate RISC-V default machine option
  2025-04-04 12:28 [PATCH for-10.0] docs: deprecate RISC-V default machine option Daniel Henrique Barboza
                   ` (2 preceding siblings ...)
  2025-04-06 23:22 ` Alistair Francis
@ 2025-04-06 23:32 ` Alistair Francis
  3 siblings, 0 replies; 6+ messages in thread
From: Alistair Francis @ 2025-04-06 23:32 UTC (permalink / raw)
  To: Daniel Henrique Barboza
  Cc: qemu-devel, qemu-riscv, alistair.francis, liwei1518, zhiwei_liu,
	palmer, Philippe Mathieu-Daudé

On Fri, Apr 4, 2025 at 10:30 PM Daniel Henrique Barboza
<dbarboza@ventanamicro.com> wrote:
>
> Commit 5b4beba124 ("RISC-V Spike Machines") added the Spike machine and
> made it default for qemu-system-riscv32/64. It was the first RISC-V
> machine added in QEMU so setting it as default was sensible.
>
> Today we have 7 riscv64 and 6 riscv32 machines and having 'spike' as
> default machine is not intuitive. For example, [1] is a bug that was
> opened with the 'virt' board in mind, but given that the user didn't
> pass a '-machine' option, the user was using 'spike' without knowing.
>
> Being explicit in the command line is desirable when we have a handful
> of boards available, so deprecate the default machine setting from
> RISC-V.
>
> [1] https://gitlab.com/qemu-project/qemu/-/issues/2467
>
> Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

Thanks!

Applied to riscv-to-apply.next

Alistair

> ---
>  docs/about/deprecated.rst | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index 76291fdfd6..0f41a99c67 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -304,6 +304,23 @@ online to check that this board did not completely bitrot yet). It is
>  recommended to use another MIPS machine for future MIPS code development
>  instead.
>
> +RISC-V default machine option (since 10.0)
> +''''''''''''''''''''''''''''''''''''''''''
> +
> +RISC-V defines ``spike`` as the default machine if no machine option is
> +given in the command line.  This happens because ``spike`` is the first
> +RISC-V machine implemented in QEMU and setting it as default was
> +convenient at that time.  Now we have 7 riscv64 and 6 riscv32 machines
> +and having ``spike`` as a default is no longer justified.  This default
> +will also promote situations where users think they're running ``virt``
> +(the most used RISC-V machine type in 10.0) when in fact they're
> +running ``spike``.
> +
> +Removing the default machine option forces users to always set the machine
> +they want to use and avoids confusion.  Existing users of the ``spike``
> +machine must ensure that they're setting the ``spike`` machine in the
> +command line (``-M spike``).
> +
>
>  Backend options
>  ---------------
> --
> 2.49.0
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-04-06 23:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-04 12:28 [PATCH for-10.0] docs: deprecate RISC-V default machine option Daniel Henrique Barboza
2025-04-04 13:07 ` Philippe Mathieu-Daudé
2025-04-04 13:14   ` Daniel Henrique Barboza
2025-04-04 14:09 ` Richard Henderson
2025-04-06 23:22 ` Alistair Francis
2025-04-06 23:32 ` Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).