From: Andrew Jones <ajones@ventanamicro.com>
To: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Cc: qemu-devel@nongnu.org, qemu-riscv@nongnu.org,
alistair.francis@wdc.com, liwei1518@gmail.com,
zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com
Subject: Re: [PATCH 2/2] hw/riscv/virt.c: change default CPU to 'max'
Date: Thu, 24 Apr 2025 10:20:49 +0200 [thread overview]
Message-ID: <20250424-6351b8780f6887b09c2c655f@orel> (raw)
In-Reply-To: <20250404152750.332791-3-dbarboza@ventanamicro.com>
On Fri, Apr 04, 2025 at 12:27:50PM -0300, Daniel Henrique Barboza wrote:
> In [1], minute 44, we have a hint from a Canonical kernel developer that
> the next Ubuntu LTS will be RVA23 compliant. If this really comes to
> pass, the 'virt' CPU won't run it by default - we'll need to either use
> 'rva23s64' or 'max' CPUs instead because rv64 is not RVA23 compliant.
> Other distros will follow suit eventually, given that RISC-V profiles
> provides the most stable ABI to build a distro in the RISC-V land.
>
> This exposes a long standing issue with the current rv64 CPU: it doesn't
> represent anything in particular. Extensions were added in it as time
> went by and we ended up with a CPU that has a random set of extensions.
>
> Changing the default 'virt' CPU to 'max' gives users a guarantee that
> the board will always run with the latest features/profile available in
> QEMU, which is the intention of most regular users. Using 'max' as
> default CPU is done by other QEMU archs like aarch64 so we'll be more
> compatible with everyone else.
>
> Note that this change does not affect existing scripts that are using
> the rv64 CPU, e.g. a command line like "-cpu rv64,v=true" will work the
> same after this patch.
>
> [1] https://fosdem.org/2025/schedule/event/fosdem-2025-6031-risc-v-hardware-where-are-we-/
>
> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
> ---
> hw/riscv/virt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
> index c9d255d8a8..ff7a122bef 100644
> --- a/hw/riscv/virt.c
> +++ b/hw/riscv/virt.c
> @@ -1920,7 +1920,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
> mc->desc = "RISC-V VirtIO board";
> mc->init = virt_machine_init;
> mc->max_cpus = VIRT_CPUS_MAX;
> - mc->default_cpu_type = TYPE_RISCV_CPU_BASE;
> + mc->default_cpu_type = TYPE_RISCV_CPU_MAX;
> mc->block_default_type = IF_VIRTIO;
> mc->no_cdrom = 1;
> mc->pci_allow_0_address = true;
> --
> 2.49.0
>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
next prev parent reply other threads:[~2025-04-24 8:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-04 15:27 [PATCH 0/2] hw/riscv/virt.c: change default CPU to 'max' Daniel Henrique Barboza
2025-04-04 15:27 ` [PATCH 1/2] target/riscv/tcg: make 'max' cpu rva23s64 compliant Daniel Henrique Barboza
2025-04-06 23:26 ` Alistair Francis
2025-04-04 15:27 ` [PATCH 2/2] hw/riscv/virt.c: change default CPU to 'max' Daniel Henrique Barboza
2025-04-04 23:01 ` Richard Henderson
2025-04-06 23:31 ` Alistair Francis
2025-04-24 10:00 ` Philippe Mathieu-Daudé
2025-04-24 8:20 ` Andrew Jones [this message]
2025-05-05 22:46 ` [PATCH 0/2] " Daniel Henrique Barboza
2025-05-19 0:19 ` Alistair Francis
2025-05-20 6:16 ` David Abdurachmanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250424-6351b8780f6887b09c2c655f@orel \
--to=ajones@ventanamicro.com \
--cc=alistair.francis@wdc.com \
--cc=dbarboza@ventanamicro.com \
--cc=liwei1518@gmail.com \
--cc=palmer@rivosinc.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=zhiwei_liu@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).