[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 11/11] target-i386: Return runnability inform
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH v4 11/11] target-i386: Return runnability information on query-cpu-definitions |
Date: |
Fri, 30 Sep 2016 10:40:54 -0300 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
On Fri, Sep 30, 2016 at 10:02:49AM +0200, Paolo Bonzini wrote:
> On 29/09/2016 23:14, Eduardo Habkost wrote:
> > +/* Return the feature property name for a feature flag bit */
> > +static const char *x86_cpu_feature_name(FeatureWord w, int bitnr)
> > +{
> > + /* XSAVE components are automatically enabled by other features,
> > + * so return the original feature name instead
> > + */
> > + if (w == FEAT_XSAVE_COMP_LO || w == FEAT_XSAVE_COMP_HI) {
> > + int comp = (w == FEAT_XSAVE_COMP_HI) ? bitnr + 32 : bitnr;
> > +
> > + if (comp < ARRAY_SIZE(x86_ext_save_areas) &&
> > + x86_ext_save_areas[comp].bits) {
> > + w = x86_ext_save_areas[comp].feature;
> > + bitnr = ctz32(x86_ext_save_areas[comp].bits);
> > + }
> > + }
> > +
> > + assert(bitnr < 32);
> > + assert(w < FEATURE_WORDS);
> > + return feature_word_info[w].feat_names[bitnr];
> > +}
> > +
>
> Could this be used to replace migratable_features?
It can. I will do it in a follow-up patch.
--
Eduardo
- [Qemu-devel] [PATCH v4 04/11] target-i386: Make plus_features/minus_features QOM-based, (continued)
- [Qemu-devel] [PATCH v4 04/11] target-i386: Make plus_features/minus_features QOM-based, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 07/11] target-i386: xsave: Add FP and SSE bits to x86_ext_save_areas, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 05/11] target-i386: Remove underscores from property names, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 02/11] target-i386: List CPU models using subclass list, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 08/11] target-i386: Move warning code outside x86_cpu_filter_features(), Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 06/11] target-i386: Register properties for feature aliases manually, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 11/11] target-i386: Return runnability information on query-cpu-definitions, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 10/11] qmp: Add runnability information to query-cpu-definitions, Eduardo Habkost, 2016/09/29
- [Qemu-devel] [PATCH v4 09/11] target-i386: x86_cpu_load_features() function, Eduardo Habkost, 2016/09/29