From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGzJi-0004wx-5f for qemu-devel@nongnu.org; Wed, 26 Sep 2012 17:38:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGzJg-0006t7-Kv for qemu-devel@nongnu.org; Wed, 26 Sep 2012 17:38:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGzJg-0006sz-Cb for qemu-devel@nongnu.org; Wed, 26 Sep 2012 17:38:48 -0400 Date: Wed, 26 Sep 2012 18:39:51 -0300 From: Eduardo Habkost Message-ID: <20120926213951.GW3983@otherpad.lan.raisama.net> References: <1348691578-17231-1-git-send-email-imammedo@redhat.com> <1348691578-17231-8-git-send-email-imammedo@redhat.com> <5063742D.7070507@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5063742D.7070507@zytor.com> Subject: Re: [Qemu-devel] [PATCH 07/22] target-i386: convert cpuid features into properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "H. Peter Anvin" Cc: aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, jan.kiszka@siemens.com, Don@CloudSwitch.com, mtosatti@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, blauwirbel@gmail.com, pbonzini@redhat.com, Igor Mammedov , lersek@redhat.com, afaerber@suse.de 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