[Top][All Lists]
[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
- [Qemu-devel] [PATCH 10/22] target-i386: convert 'hv_relaxed' feature into property, (continued)
- [Qemu-devel] [PATCH 10/22] target-i386: convert 'hv_relaxed' feature into property, Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 12/22] target-i386: convert 'check' and 'enforce' features into properties, Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 11/22] target-i386: convert 'hv_vapic' feature into property, Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 13/22] add visitor for parsing hz[KMG] input string, Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 15/22] target-i386: introduce vendor-override property, Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 08/22] target-i386: add stubs for hyperv_(vapic_recommended|relaxed_timing_enabled|get_spinlock_retries)(), Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 20/22] target-i386: move init of "hypervisor" feature into CPU initializer from cpudef, Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 21/22] target-i386: move default init of cpuid_kvm_features bitmap into CPU initializer from cpudef, Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 07/22] target-i386: convert cpuid features into properties, Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 18/22] target-i386: parse cpu_model string into set of stringified properties, Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 17/22] target-i386: replace uint32_t vendor fields by vendor string in x86_def_t, Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 22/22] target-i386: cleanup cpu_x86_find_by_name(), only fill x86_def_t in it, Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 16/22] target-i386: use define for cpuid vendor string size, Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 14/22] target-i386: use visit_type_hz to parse tsc_freq property value, Igor Mammedov, 2012/09/26
- [Qemu-devel] [PATCH 19/22] target-i386: use properties to set/unset user specified features on CPU, Igor Mammedov, 2012/09/26