Re: [PATCH v4 11/11] target-i386: Return runnability information on query-cpu-definitions

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

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]