From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMfzF-0007CA-Ny for qemu-devel@nongnu.org; Sun, 09 Mar 2014 11:50:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMfz8-00075A-MH for qemu-devel@nongnu.org; Sun, 09 Mar 2014 11:50:01 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35752 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMfz8-000752-FN for qemu-devel@nongnu.org; Sun, 09 Mar 2014 11:49:54 -0400 Message-ID: <531C8DA0.5040508@suse.de> Date: Sun, 09 Mar 2014 16:49:52 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1393313787-890-1-git-send-email-afaerber@suse.de> <1393313787-890-3-git-send-email-afaerber@suse.de> <20140304195301.GZ24353@otherpad.lan.raisama.net> In-Reply-To: <20140304195301.GZ24353@otherpad.lan.raisama.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu v10 2/2] target-i386: X86CPU model subclasses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Paolo Bonzini , qemu-devel@nongnu.org, Anthony Liguori , Igor Mammedov Am 04.03.2014 20:53, schrieb Eduardo Habkost: > On Tue, Feb 25, 2014 at 08:36:27AM +0100, Andreas F=E4rber wrote: >> From: Eduardo Habkost >> >> Register separate QOM types for each x86 CPU model. >> >> This will allow management code to more easily probe what each CPU mod= el >> provides, by simply creating objects using the appropriate class name, >> without having to restart QEMU. >> >> This also allows us to eliminate the qdev_prop_set_globals_for_type() >> hack to set CPU-model-specific global properties. >> >> Instead of creating separate class_init functions for each class, I ju= st >> used class_data to store a pointer to the X86CPUDefinition struct for >> each CPU model. This should make the patch shorter and easier to revie= w. >> Later we can gradually convert each X86CPUDefinition field to lists of >> per-class property defaults. >> >> 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. >> >> Signed-off-by: Andreas F=E4rber >> Signed-off-by: Igor Mammedov >> Signed-off-by: Eduardo Habkost >> Signed-off-by: Andreas F=E4rber >=20 > For the changes you introduced: >=20 > Reviewed-by: Eduardo Habkost > Tested-by: Eduardo Habkost >=20 > After hacking the code to allow device_add on CPUs, I could use the > classes to instantiate CPUs from different models using device_add > (which would be useful to allow probing of CPU model information in a > single QEMU instance). Thanks a lot, I'm proceeding to staging this on qom-cpu-next: https://github.com/afaerber/qemu-cpu/commits/qom-cpu-next Features parsing needs minor merges. Goal is still 2.0. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg