On 04.08.2026 17:47, Oleksii Kurochko wrote:
> @@ -34,9 +36,35 @@ struct riscv_isa_ext_data {
>      .name = #ext_name,                          \
>  }
>  
> +struct riscv_isa_ext_entry {
> +    unsigned int id;
> +    const char *name;
> +    bool guest_supported;
> +};
> +
> +#define RISCV_ISA_EXT_ENTRY(ext_name, guest_supp)       \
> +{                                                       \
> +    .id              = RISCV_ISA_EXT_ ## ext_name,      \
> +    .name            = #ext_name,                       \
> +    .guest_supported = guest_supp,                      \
> +}
> +
>  /* Host ISA bitmap */
>  static __ro_after_init DECLARE_BITMAP(riscv_isa, RISCV_ISA_EXT_MAX);
>  
> +/*
> + * ISA bitmap handed out to every guest.
> + *
> + * All guests are given the same extensions for the time being, so this is
> + * computed once out of riscv_isa_ext[] and riscv_isa, rather than redoing
> + * the walk for every domain created.  Should per-domain ISA policy ever be
> + * introduced, this will need to become per-domain again.
> + */
> +static __ro_after_init DECLARE_BITMAP(guest_isa, RISCV_ISA_EXT_MAX);
> +
> +/* "riscv,isa" string corresponding to guest_isa, shared by all domains. */
> +static char *__ro_after_init guest_isa_str;

This would better be pointer-to-const, as nothing should alter the string
anymore once it was built. Then:
Acked-by: Jan Beulich <[email protected]>

Jan

Reply via email to