qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

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