Re: [PATCH v7 04/20] xen/riscv: introduce guest riscv,isa string

Jan Beulich <[email protected]>
Newsgroups org.xenproject.lists.xen-devel
Message-ID <[email protected]>
On 04.08.2026 17:47, Oleksii Kurochko wrote:
> @@ -120,29 +148,30 @@ static int __init dt_get_cpuid_from_node(const struct dt_device_node *cpu,
>   * and strncmp() is used in match_isa_ext() to compare extension names instead
>   * of strncasecmp().
>   */
> -const struct riscv_isa_ext_data __initconst riscv_isa_ext[] = {
> -    RISCV_ISA_EXT_DATA(i),
> -    RISCV_ISA_EXT_DATA(m),
> -    RISCV_ISA_EXT_DATA(a),
> -    RISCV_ISA_EXT_DATA(f),
> -    RISCV_ISA_EXT_DATA(d),
> -    RISCV_ISA_EXT_DATA(q),
> -    RISCV_ISA_EXT_DATA(c),
> -    RISCV_ISA_EXT_DATA(h),
> -    RISCV_ISA_EXT_DATA(zicntr),
> -    RISCV_ISA_EXT_DATA(zicsr),
> -    RISCV_ISA_EXT_DATA(zifencei),
> -    RISCV_ISA_EXT_DATA(zihintpause),
> -    RISCV_ISA_EXT_DATA(zihpm),
> -    RISCV_ISA_EXT_DATA(zba),
> -    RISCV_ISA_EXT_DATA(zbb),
> -    RISCV_ISA_EXT_DATA(zbs),
> -    RISCV_ISA_EXT_DATA(smaia),
> -    RISCV_ISA_EXT_DATA(smstateen),
> -    RISCV_ISA_EXT_DATA(ssaia),
> -    RISCV_ISA_EXT_DATA(sstc),
> -    RISCV_ISA_EXT_DATA(svade),
> -    RISCV_ISA_EXT_DATA(svpbmt),
> +static const struct riscv_isa_ext_entry __initconstrel riscv_isa_ext[] = {
> +    RISCV_ISA_EXT_ENTRY(i,            true),
> +    RISCV_ISA_EXT_ENTRY(m,            true),
> +    RISCV_ISA_EXT_ENTRY(a,            true),
> +    RISCV_ISA_EXT_ENTRY(f,            false),
> +    RISCV_ISA_EXT_ENTRY(d,            false),
> +    RISCV_ISA_EXT_ENTRY(q,            false),
> +    RISCV_ISA_EXT_ENTRY(c,            true),
> +    RISCV_ISA_EXT_ENTRY(v,            false),
> +    RISCV_ISA_EXT_ENTRY(h,            false),
> +    RISCV_ISA_EXT_ENTRY(zicntr,       true),
> +    RISCV_ISA_EXT_ENTRY(zicsr,        true),
> +    RISCV_ISA_EXT_ENTRY(zifencei,     true),
> +    RISCV_ISA_EXT_ENTRY(zihintpause,  true),
> +    RISCV_ISA_EXT_ENTRY(zihpm,        true),
> +    RISCV_ISA_EXT_ENTRY(zba,          true),
> +    RISCV_ISA_EXT_ENTRY(zbb,          true),
> +    RISCV_ISA_EXT_ENTRY(zbs,          true),
> +    RISCV_ISA_EXT_ENTRY(smaia,        true),
> +    RISCV_ISA_EXT_ENTRY(smstateen,    true),
> +    RISCV_ISA_EXT_ENTRY(ssaia,        true),
> +    RISCV_ISA_EXT_ENTRY(sstc,         false),
> +    RISCV_ISA_EXT_ENTRY(svade,        false),
> +    RISCV_ISA_EXT_ENTRY(svpbmt,       false),
>  };

Just as an independent, up front remark after having looked at patch 16/17 of
the other series: Is a mere boolean going to suffice in the longer run? I could
see some extensions wanting exposing to only RV32 or only RV64 guests. E.g.
Zilsd is RV32-only, while Zqinx quite likely would want restricting to RV64.

Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.