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, bmeng@tinylab.org,
liweiwei@iscas.ac.cn, zhiwei_liu@linux.alibaba.com,
palmer@rivosinc.com
Subject: Re: [PATCH RESEND v8 12/20] target/riscv: deprecate the 'any' CPU type
Date: Thu, 31 Aug 2023 15:19:44 +0200 [thread overview]
Message-ID: <20230831-0bdd700ffe84ea667111a712@orel> (raw)
In-Reply-To: <20230824221440.484675-13-dbarboza@ventanamicro.com>
On Thu, Aug 24, 2023 at 07:14:32PM -0300, Daniel Henrique Barboza wrote:
> The 'any' CPU type was introduced in commit dc5bd18fa5725 ("RISC-V CPU
> Core Definition"), being around since the beginning. It's not an easy
> CPU to use: it's undocumented and its name doesn't tell users much about
> what the CPU is supposed to bring. 'git log' doesn't help us either in
> knowing what was the original design of this CPU type.
>
> The closest we have is a comment from Alistair [1] where he recalls from
> memory that the 'any' CPU is supposed to behave like the newly added
> 'max' CPU. He also suggested that the 'any' CPU should be removed.
>
> The default CPUs are rv32 and rv64, so removing the 'any' CPU will have
> impact only on users that might have a script that uses '-cpu any'.
> And those users are better off using the default CPUs or the new 'max'
> CPU.
>
> We would love to just remove the code and be done with it, but one does
> not simply remove a feature in QEMU. We'll put the CPU in quarantine
> first, letting users know that we have the intent of removing it in the
> future.
>
> [1] https://lists.gnu.org/archive/html/qemu-devel/2023-07/msg02891.html
>
> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
> ---
> docs/about/deprecated.rst | 12 ++++++++++++
> target/riscv/cpu.c | 5 +++++
> 2 files changed, 17 insertions(+)
>
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index 92a2bafd2b..4ced7427ac 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -371,6 +371,18 @@ QEMU's ``vhost`` feature, which would eliminate the high latency costs under
> which the 9p ``proxy`` backend currently suffers. However as of to date nobody
> has indicated plans for such kind of reimplementation unfortunately.
>
> +RISC-V 'any' CPU type ``-cpu any`` (since 8.2)
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +The 'any' CPU type was introduced back in 2018 and has been around since the
> +initial RISC-V QEMU port. Its usage has always been unclear: users don't know
> +what to expect from a CPU called 'any', and in fact the CPU does not do anything
> +special that aren't already done by the default CPUs rv32/rv64.
^ isn't
> +
> +After the introduction of the 'max' CPU type RISC-V now has a good coverage
^ ,
> +of generic CPUs: rv32 and rv64 as default CPUs and 'max' as a feature complete
> +CPU for both 32 and 64 bit builds. Users are then discouraged to use the 'any'
> +CPU type starting in 8.2.
>
> Block device options
> ''''''''''''''''''''
> diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
> index 8dc85f75bb..913b64264f 100644
> --- a/target/riscv/cpu.c
> +++ b/target/riscv/cpu.c
> @@ -1522,6 +1522,11 @@ static void riscv_cpu_realize(DeviceState *dev, Error **errp)
> RISCVCPUClass *mcc = RISCV_CPU_GET_CLASS(dev);
> Error *local_err = NULL;
>
> + if (object_dynamic_cast(OBJECT(dev), TYPE_RISCV_CPU_ANY) != NULL) {
> + warn_report("The 'any' CPU is deprecated and will be "
> + "removed in the future.");
> + }
> +
> cpu_exec_realizefn(cs, &local_err);
> if (local_err != NULL) {
> error_propagate(errp, local_err);
> --
> 2.41.0
>
>
Besides the text edits,
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
next prev parent reply other threads:[~2023-08-31 13:20 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-24 22:14 [PATCH RESEND v8 00/20] riscv: 'max' CPU, detect user choice in TCG Daniel Henrique Barboza
2023-08-24 22:14 ` [PATCH RESEND v8 01/20] target/riscv/cpu.c: split CPU options from riscv_cpu_extensions[] Daniel Henrique Barboza
2023-08-31 12:49 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 02/20] target/riscv/cpu.c: skip 'bool' check when filtering KVM props Daniel Henrique Barboza
2023-08-31 12:49 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 03/20] target/riscv/cpu.c: split kvm prop handling to its own helper Daniel Henrique Barboza
2023-08-31 12:51 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 04/20] target/riscv: add DEFINE_PROP_END_OF_LIST() to riscv_cpu_options[] Daniel Henrique Barboza
2023-08-31 12:54 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 05/20] target/riscv/cpu.c: split non-ratified exts from riscv_cpu_extensions[] Daniel Henrique Barboza
2023-08-31 12:56 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 06/20] target/riscv/cpu.c: split vendor " Daniel Henrique Barboza
2023-08-31 12:57 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 07/20] target/riscv/cpu.c: add riscv_cpu_add_qdev_prop_array() Daniel Henrique Barboza
2023-08-31 13:01 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 08/20] target/riscv/cpu.c: add riscv_cpu_add_kvm_unavail_prop_array() Daniel Henrique Barboza
2023-08-31 13:03 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 09/20] target/riscv/cpu.c: limit cfg->vext_spec log message Daniel Henrique Barboza
2023-08-24 22:14 ` [PATCH RESEND v8 10/20] target/riscv: add 'max' CPU type Daniel Henrique Barboza
2023-08-31 13:11 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 11/20] avocado, risc-v: add opensbi tests for 'max' CPU Daniel Henrique Barboza
2023-08-31 13:16 ` Andrew Jones
2023-08-31 14:20 ` Daniel Henrique Barboza
2023-08-24 22:14 ` [PATCH RESEND v8 12/20] target/riscv: deprecate the 'any' CPU type Daniel Henrique Barboza
2023-08-31 13:19 ` Andrew Jones [this message]
2023-08-24 22:14 ` [PATCH RESEND v8 13/20] target/riscv/cpu.c: use offset in isa_ext_is_enabled/update_enabled Daniel Henrique Barboza
2023-08-31 13:20 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 14/20] target/riscv: make CPUCFG() macro public Daniel Henrique Barboza
2023-08-31 13:22 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 15/20] target/riscv/cpu.c: introduce cpu_cfg_ext_auto_update() Daniel Henrique Barboza
2023-08-31 13:33 ` Andrew Jones
2023-08-31 14:12 ` Daniel Henrique Barboza
2023-08-24 22:14 ` [PATCH RESEND v8 16/20] target/riscv/cpu.c: use cpu_cfg_ext_auto_update() during realize() Daniel Henrique Barboza
2023-08-31 13:37 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 17/20] target/riscv/cpu.c: introduce RISCVCPUMultiExtConfig Daniel Henrique Barboza
2023-08-31 13:43 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 18/20] target/riscv: use isa_ext_update_enabled() in init_max_cpu_extensions() Daniel Henrique Barboza
2023-08-31 13:56 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 19/20] target/riscv/cpu.c: honor user choice in cpu_cfg_ext_auto_update() Daniel Henrique Barboza
2023-08-31 13:58 ` Andrew Jones
2023-08-24 22:14 ` [PATCH RESEND v8 20/20] target/riscv/cpu.c: consider user option with RVG Daniel Henrique Barboza
2023-08-31 14:02 ` Andrew Jones
2023-08-31 15:43 ` Daniel Henrique Barboza
2023-08-31 14:05 ` [PATCH RESEND v8 00/20] riscv: 'max' CPU, detect user choice in TCG Andrew Jones
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=20230831-0bdd700ffe84ea667111a712@orel \
--to=ajones@ventanamicro.com \
--cc=alistair.francis@wdc.com \
--cc=bmeng@tinylab.org \
--cc=dbarboza@ventanamicro.com \
--cc=liweiwei@iscas.ac.cn \
--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).