On Fri, May 30, 2025 at 11:47 PM Daniel Henrique Barboza
<dbarb...@ventanamicro.com> wrote:
>
> These properties were deprecated in QEMU 8.2, commit 8043effd9b.
>
> Signed-off-by: Daniel Henrique Barboza <dbarb...@ventanamicro.com>

Thanks!

Applied to riscv-to-apply.next

Alistair

> ---
>  target/riscv/cpu.c         | 17 -----------------
>  target/riscv/cpu.h         |  1 -
>  target/riscv/tcg/tcg-cpu.c | 31 +------------------------------
>  3 files changed, 1 insertion(+), 48 deletions(-)
>
> diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
> index fe21e0fb44..7c6e0844d0 100644
> --- a/target/riscv/cpu.c
> +++ b/target/riscv/cpu.c
> @@ -1387,23 +1387,6 @@ const RISCVCPUMultiExtConfig 
> riscv_cpu_named_features[] = {
>      { },
>  };
>
> -/* Deprecated entries marked for future removal */
> -const RISCVCPUMultiExtConfig riscv_cpu_deprecated_exts[] = {
> -    MULTI_EXT_CFG_BOOL("Zifencei", ext_zifencei, true),
> -    MULTI_EXT_CFG_BOOL("Zicsr", ext_zicsr, true),
> -    MULTI_EXT_CFG_BOOL("Zihintntl", ext_zihintntl, true),
> -    MULTI_EXT_CFG_BOOL("Zihintpause", ext_zihintpause, true),
> -    MULTI_EXT_CFG_BOOL("Zawrs", ext_zawrs, true),
> -    MULTI_EXT_CFG_BOOL("Zfa", ext_zfa, true),
> -    MULTI_EXT_CFG_BOOL("Zfh", ext_zfh, false),
> -    MULTI_EXT_CFG_BOOL("Zfhmin", ext_zfhmin, false),
> -    MULTI_EXT_CFG_BOOL("Zve32f", ext_zve32f, false),
> -    MULTI_EXT_CFG_BOOL("Zve64f", ext_zve64f, false),
> -    MULTI_EXT_CFG_BOOL("Zve64d", ext_zve64d, false),
> -
> -    { },
> -};
> -
>  static void cpu_set_prop_err(RISCVCPU *cpu, const char *propname,
>                               Error **errp)
>  {
> diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
> index 2a6793e022..17bf4e7579 100644
> --- a/target/riscv/cpu.h
> +++ b/target/riscv/cpu.h
> @@ -951,7 +951,6 @@ extern const RISCVCPUMultiExtConfig 
> riscv_cpu_extensions[];
>  extern const RISCVCPUMultiExtConfig riscv_cpu_vendor_exts[];
>  extern const RISCVCPUMultiExtConfig riscv_cpu_experimental_exts[];
>  extern const RISCVCPUMultiExtConfig riscv_cpu_named_features[];
> -extern const RISCVCPUMultiExtConfig riscv_cpu_deprecated_exts[];
>
>  typedef struct isa_ext_data {
>      const char *name;
> diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c
> index 66929f2e8d..8ebffe55bc 100644
> --- a/target/riscv/tcg/tcg-cpu.c
> +++ b/target/riscv/tcg/tcg-cpu.c
> @@ -1416,25 +1416,6 @@ static void riscv_cpu_add_profiles(Object *cpu_obj)
>      }
>  }
>
> -static bool cpu_ext_is_deprecated(const char *ext_name)
> -{
> -    return isupper(ext_name[0]);
> -}
> -
> -/*
> - * String will be allocated in the heap. Caller is responsible
> - * for freeing it.
> - */
> -static char *cpu_ext_to_lower(const char *ext_name)
> -{
> -    char *ret = g_malloc0(strlen(ext_name) + 1);
> -
> -    strcpy(ret, ext_name);
> -    ret[0] = tolower(ret[0]);
> -
> -    return ret;
> -}
> -
>  static void cpu_set_multi_ext_cfg(Object *obj, Visitor *v, const char *name,
>                                    void *opaque, Error **errp)
>  {
> @@ -1447,13 +1428,6 @@ static void cpu_set_multi_ext_cfg(Object *obj, Visitor 
> *v, const char *name,
>          return;
>      }
>
> -    if (cpu_ext_is_deprecated(multi_ext_cfg->name)) {
> -        g_autofree char *lower = cpu_ext_to_lower(multi_ext_cfg->name);
> -
> -        warn_report("CPU property '%s' is deprecated. Please use '%s' 
> instead",
> -                    multi_ext_cfg->name, lower);
> -    }
> -
>      cpu_cfg_ext_add_user_opt(multi_ext_cfg->offset, value);
>
>      prev_val = isa_ext_is_enabled(cpu, multi_ext_cfg->offset);
> @@ -1489,14 +1463,13 @@ static void cpu_add_multi_ext_prop(Object *cpu_obj,
>                                     const RISCVCPUMultiExtConfig *multi_cfg)
>  {
>      bool generic_cpu = riscv_cpu_is_generic(cpu_obj);
> -    bool deprecated_ext = cpu_ext_is_deprecated(multi_cfg->name);
>
>      object_property_add(cpu_obj, multi_cfg->name, "bool",
>                          cpu_get_multi_ext_cfg,
>                          cpu_set_multi_ext_cfg,
>                          NULL, (void *)multi_cfg);
>
> -    if (!generic_cpu || deprecated_ext) {
> +    if (!generic_cpu) {
>          return;
>      }
>
> @@ -1539,8 +1512,6 @@ static void riscv_cpu_add_user_properties(Object *obj)
>      riscv_cpu_add_multiext_prop_array(obj, riscv_cpu_vendor_exts);
>      riscv_cpu_add_multiext_prop_array(obj, riscv_cpu_experimental_exts);
>
> -    riscv_cpu_add_multiext_prop_array(obj, riscv_cpu_deprecated_exts);
> -
>      riscv_cpu_add_profiles(obj);
>  }
>
> --
> 2.49.0
>
>

Reply via email to