[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 4/9] target/riscv/tcg: add MISA user options hash
From: |
Andrew Jones |
Subject: |
Re: [PATCH v4 4/9] target/riscv/tcg: add MISA user options hash |
Date: |
Wed, 25 Oct 2023 18:14:07 +0200 |
On Wed, Oct 25, 2023 at 10:49:56AM -0300, Daniel Henrique Barboza wrote:
> We already track user choice for multi-letter extensions because we
> needed to honor user choice when enabling/disabling extensions during
> realize(). We refrained from adding the same mechanism for MISA
> extensions since we didn't need it.
>
> Profile support requires tne need to check for user choice for MISA
> extensions, so let's add the corresponding hash now. It works like the
> existing multi-letter hash (multi_ext_user_opts) but tracking MISA bits
> options in the cpu_set_misa_ext_cfg() callback.
>
> Note that we can't re-use the same hash from multi-letter extensions
> because that hash uses cpu->cfg offsets as keys, while for MISA
> extensions we're using MISA bits as keys.
>
> After adding the user hash in cpu_set_misa_ext_cfg(), setting default
> values with object_property_set_bool() in add_misa_properties() will end
> up marking the user choice hash with them. Set the default value
> manually to avoid it.
>
> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
> Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
> ---
> target/riscv/tcg/tcg-cpu.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
- [PATCH v4 0/9] RVA22U64 profile support, Daniel Henrique Barboza, 2023/10/25
- [PATCH v4 1/9] target/riscv: add rva22u64 profile definition, Daniel Henrique Barboza, 2023/10/25
- [PATCH v4 3/9] target/riscv/tcg: add user flag for profile support, Daniel Henrique Barboza, 2023/10/25
- [PATCH v4 2/9] target/riscv/kvm: add 'rva22u64' flag as unavailable, Daniel Henrique Barboza, 2023/10/25
- [PATCH v4 6/9] target/riscv/tcg: handle profile MISA bits, Daniel Henrique Barboza, 2023/10/25
- [PATCH v4 4/9] target/riscv/tcg: add MISA user options hash, Daniel Henrique Barboza, 2023/10/25
- Re: [PATCH v4 4/9] target/riscv/tcg: add MISA user options hash,
Andrew Jones <=
- [PATCH v4 5/9] target/riscv/tcg: add riscv_cpu_write_misa_bit(), Daniel Henrique Barboza, 2023/10/25
- [PATCH v4 8/9] target/riscv/tcg: honor user choice for G MISA bits, Daniel Henrique Barboza, 2023/10/25
- [PATCH v4 9/9] target/riscv/tcg: warn if profile exts are disabled, Daniel Henrique Barboza, 2023/10/25
- [PATCH v4 7/9] target/riscv/tcg: add hash table insert helpers, Daniel Henrique Barboza, 2023/10/25