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: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH 07/22] target-i386: convert cpuid features into properties
Date: Wed, 26 Sep 2012 18:39:51 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Sep 26, 2012 at 02:31:25PM -0700, H. Peter Anvin wrote:
> 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)?

I have a series that does that, based on this one, that I will clean up
and submit after the other changes get in.

https://github.com/ehabkost/qemu-hacks/commits/work/cpuid-refactor-v0.22-2012-08-31

-- 
Eduardo



reply via email to

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