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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v4 11/11] target-i386: Return runnability information on query-cpu-definitions
Date: Fri, 30 Sep 2016 10:02:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0


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?

Paolo



reply via email to

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