qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 08/28] x86: extract legacy cpu features format p


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH 08/28] x86: extract legacy cpu features format parser
Date: Wed, 16 Aug 2017 16:32:18 -0300
User-agent: Mutt/1.8.0 (2017-02-23)

On Fri, Jul 14, 2017 at 03:51:59PM +0200, Igor Mammedov wrote:
> Move cpu_model +-feat parsing into a separate file so that it
> could be reused later for parsing similar format of sparc target
> 
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
> CC: Riku Voipio <address@hidden>
> CC: Laurent Vivier <address@hidden>
> CC: Paolo Bonzini <address@hidden>
> CC: Richard Henderson <address@hidden>
> CC: Eduardo Habkost <address@hidden>
> ---
>  include/qom/cpu.h                     |   6 ++
>  default-configs/i386-bsd-user.mak     |   1 +
>  default-configs/i386-linux-user.mak   |   1 +
>  default-configs/i386-softmmu.mak      |   1 +
>  default-configs/x86_64-bsd-user.mak   |   1 +
>  default-configs/x86_64-linux-user.mak |   1 +
>  default-configs/x86_64-softmmu.mak    |   1 +
>  target/i386/cpu.c                     | 124 ++-------------------------
>  util/Makefile.objs                    |   1 +
>  util/legacy_cpu_features_parser.c     | 153 
> ++++++++++++++++++++++++++++++++++
>  10 files changed, 172 insertions(+), 118 deletions(-)
>  create mode 100644 util/legacy_cpu_features_parser.c
> 
> diff --git a/include/qom/cpu.h b/include/qom/cpu.h
> index 7bfd50c..60aea03 100644
> --- a/include/qom/cpu.h
> +++ b/include/qom/cpu.h
> @@ -1039,4 +1039,10 @@ extern const struct VMStateDescription 
> vmstate_cpu_common;
>  
>  #define UNASSIGNED_CPU_INDEX -1
>  
> +int cpu_legacy_apply_features(Object *obj, GList *features, bool enable,
> +                              Error **errp);
> +
> +void cpu_legacy_parse_featurestr(const char *typename, char *features,
> +                                 GList **plus_features, GList 
> **minus_features,
> +                                 Error **errp);

plus_features and minus_features only exist because of a (now
fixed) bug in the handling of cpu->max_features, and we don't
need them anymore, see the comment at x86_cpu_expand_features():

    /*TODO: Now cpu->max_features doesn't overwrite features
     * set using QOM properties, and we can convert
     * plus_features & minus_features to global properties
     * inside x86_cpu_parse_featurestr() too.
     */

Let's remove them instead of exposing this unnecessary misfeature
on the generic API.

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]