From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCnTb-0005M9-Tp for qemu-devel@nongnu.org; Mon, 10 Feb 2014 04:48:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCnTU-00007b-Oo for qemu-devel@nongnu.org; Mon, 10 Feb 2014 04:48:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:12883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCnTU-00007S-FQ for qemu-devel@nongnu.org; Mon, 10 Feb 2014 04:48:24 -0500 Date: Mon, 10 Feb 2014 10:48:19 +0100 From: Igor Mammedov Message-ID: <20140210104819.1666ea99@nial.usersys.redhat.com> In-Reply-To: <52F81C09.6070504@suse.de> References: <1391111339-6958-1-git-send-email-ehabkost@redhat.com> <1391111339-6958-8-git-send-email-ehabkost@redhat.com> <20140131181338.GB28427@otherpad.lan.raisama.net> <52F81C09.6070504@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [uq/master PATCH 7/7 v8] target-i386: CPU model subclasses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?ISO-8859-1?B?RuRyYmVy?= Cc: Eduardo Habkost , kvm@vger.kernel.org, libvir-list@redhat.com, qemu-devel@nongnu.org, Paolo Bonzini , Jiri Denemark On Mon, 10 Feb 2014 01:23:37 +0100 Andreas F=E4rber wrote: > Am 31.01.2014 19:13, schrieb Eduardo Habkost: > > Register separate QOM classes for each x86 CPU model. > >=20 > > This will allow management code to more easily probe what each CPU model > > provides, by simply creating objects using the appropriate class name, > > without having to restart QEMU. > >=20 > > This also allows us to eliminate the qdev_prop_set_globals_for_type() > > hack to set CPU-model-specific global properties. > >=20 > > Instead of creating separate class_init functions for each class, I just > > used class_data to store a pointer to the X86CPUDefinition struct for > > each CPU model. This should make the patch shorter and easier to review. > > Later we can gradually convert each X86CPUDefinition field to lists of > > per-class property defaults. > >=20 > > Written based on the ideas from the patch "[RFC v5] target-i386: Slim > > conversion to X86CPU subclasses + KVM subclasses" written by Andreas > > F=E4rber , Igor Mammedov . > >=20 > > The "host" CPU model is special, as the feature flags depend on KVM > > being initialized. So it has its own class_init and instance_init > > function, and feature flags are set on instance_init instead of > > class_init. > >=20 > > Signed-off-by: Andreas F=E4rber > > Signed-off-by: Igor Mammedov > > Signed-off-by: Eduardo Habkost > > --- > > This patch is similar to the one sent by Andrea and then later > > resubmitted by Igor as "[RFC v5] target-i386: Slim conversion to X86CPU > > subclasses + KVM subclasses", as it doesn't create one new class_init > > function for each subclass. > >=20 > > Main differences v5 -> v6 are: > > * Code was written from scratch (instead of using the previous patches > > as base) > > * I didn't mean to rewrite it entirely, but when doing additional > > simplification of the CPU init logic on other patches, I ended up > > rewriting it. > > * I chose to keep the Signed-off-by lines because I built upon > > Andreas's and Igor's ideas. Is that OK? >=20 > Yes, your From and our Sobs in order is the expected way in this case. > If Igor agrees I would propose to drop the textual repetition of this. I'm ok with it, but it doesn't matter since this part is under ---, so it's dropped at commit time anyway.