>
> +static void prop_sspmpen_set(Object *obj, Visitor *v, const char *name,
> + void *opaque, Error **errp)
> +{
> + RISCVCPU *cpu = RISCV_CPU(obj);
> + bool value;
> +
> + visit_type_bool(v, name, &value, errp);
> +
> + if (cpu->cfg.spmp != value && riscv_cpu_is_vendor(obj)) {
> + cpu_set_prop_err(cpu, name, errp);
> + return;
> + }
> +
> + cpu_option_add_user_setting(name, value);
> + cpu->cfg.ext_sspmpen = value;
> +
> + /* Enable necessary extensions */
> + if (value) {
> + cpu->cfg.spmp = true;
> + cpu->cfg.ext_sscsrind = true;
> + cpu->cfg.ext_smcsrind = true;
> + }
> +}
Why do we need to set it again ? So if we enable sspmpen means enable spmp
at the same time?