[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 3/6] target/riscv: add remaining named features
From: |
Andrew Jones |
Subject: |
Re: [PATCH v3 3/6] target/riscv: add remaining named features |
Date: |
Mon, 5 Feb 2024 15:04:18 +0100 |
On Fri, Feb 02, 2024 at 12:21:51PM -0300, Daniel Henrique Barboza wrote:
> The RVA22U64 and RVA22S64 profiles mandates certain extensions that,
> until now, we were implying that they were available.
>
> We can't do this anymore since named features also has a riscv,isa
> entry. Let's add them to riscv_cpu_named_features[].
>
> Instead of adding one bool for each named feature that we'll always
> implement, i.e. can't be turned off, add a 'ext_always_enabled' bool in
> cpu->cfg. This bool will be set to 'true' in TCG accel init, and all
> named features will point to it. This also means that KVM won't see
> these features as always enable, which is our intention.
>
> If any accelerator adds support to disable one of these features, we'll
> have to promote them to regular extensions and allow users to disable it
> via command line.
>
> After this patch, here's the riscv,isa from a buildroot using the
> 'rva22s64' CPU:
>
> # cat /proc/device-tree/cpus/cpu@0/riscv,isa
> rv64imafdc_zic64b_zicbom_zicbop_zicboz_ziccamoa_ziccif_zicclsm_ziccrse_
> zicntr_zicsr_zifencei_zihintpause_zihpm_za64rs_zfhmin_zca_zcd_zba_zbb_
> zbs_zkt_ssccptr_sscounterenw_sstvala_sstvecd_svade_svinval_svpbmt#
>
> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
> ---
> target/riscv/cpu.c | 42 +++++++++++++++++++++++++++++++-------
> target/riscv/cpu_cfg.h | 6 ++++++
> target/riscv/tcg/tcg-cpu.c | 2 ++
> 3 files changed, 43 insertions(+), 7 deletions(-)
>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
- [PATCH v3 0/6] riscv: named features riscv,isa, 'svade' rework, Daniel Henrique Barboza, 2024/02/02
- [PATCH v3 1/6] target/riscv/tcg: set 'mmu' with 'satp' in cpu_set_profile(), Daniel Henrique Barboza, 2024/02/02
- [PATCH v3 2/6] target/riscv: add riscv,isa to named features, Daniel Henrique Barboza, 2024/02/02
- [PATCH v3 3/6] target/riscv: add remaining named features, Daniel Henrique Barboza, 2024/02/02
- Re: [PATCH v3 3/6] target/riscv: add remaining named features,
Andrew Jones <=
- Re: [PATCH v3 3/6] target/riscv: add remaining named features, Alistair Francis, 2024/02/14
- Re: [PATCH v3 3/6] target/riscv: add remaining named features, Conor Dooley, 2024/02/15
- Re: [PATCH v3 3/6] target/riscv: add remaining named features, Andrew Jones, 2024/02/15
- Re: [PATCH v3 3/6] target/riscv: add remaining named features, Conor Dooley, 2024/02/15
- Re: [PATCH v3 3/6] target/riscv: add remaining named features, Andrew Jones, 2024/02/15
- Re: [PATCH v3 3/6] target/riscv: add remaining named features, Conor Dooley, 2024/02/15
- Re: [PATCH v3 3/6] target/riscv: add remaining named features, Alistair Francis, 2024/02/15
- Re: [PATCH v3 3/6] target/riscv: add remaining named features, Conor Dooley, 2024/02/16