qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 07/22] target-i386: convert cpuid features into


From: H. Peter Anvin
Subject: Re: [Qemu-devel] [PATCH 07/22] target-i386: convert cpuid features into properties
Date: Wed, 26 Sep 2012 14:31:25 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

On 09/26/2012 01:32 PM, Igor Mammedov wrote:
> +
> +static void x86_cpuid_get_feature(Object *obj, Visitor *v, void *opaque,
> +                                         const char *name, Error **errp)
> +{
> +    X86CPU *cpu = X86_CPU(obj);
> +    CPUX86State *env = &cpu->env;
> +    bool value = true;
> +
> +    if (!is_feature_set(name, env->cpuid_features, feature_name) &&
> +       !is_feature_set(name, env->cpuid_ext_features, ext_feature_name) &&
> +       !is_feature_set(name, env->cpuid_ext2_features, ext2_feature_name) &&
> +       !is_feature_set(name, env->cpuid_ext3_features, ext3_feature_name) &&
> +       !is_feature_set(name, env->cpuid_kvm_features, kvm_feature_name) &&
> +       !is_feature_set(name, env->cpuid_svm_features, svm_feature_name)) {
> +        value = false;
> +    }
> +

If you're going to do a full-blown restructuring of the CPUID handling,
how about actually turning this into a composite object, specifically an
array, instead of this insane collection of arguments (which needs to be
augmented)?

        -hpa




reply via email to

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