From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXSRp-0007Em-3S for qemu-devel@nongnu.org; Mon, 16 Mar 2015 06:40:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXSRj-0007UM-Vc for qemu-devel@nongnu.org; Mon, 16 Mar 2015 06:40:37 -0400 Message-ID: <5506B31D.1060504@suse.de> Date: Mon, 16 Mar 2015 11:40:29 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1425520601-3610-1-git-send-email-aik@ozlabs.ru> <54F85756.6040904@suse.de> <55066306.9060906@ozlabs.ru> In-Reply-To: <55066306.9060906@ozlabs.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH] target-ppc: Register CPU class per family only when needed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy , Alexander Graf , qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org Am 16.03.2015 um 05:58 schrieb Alexey Kardashevskiy: > On 03/06/2015 12:17 AM, Alexander Graf wrote: >> On 05.03.15 02:56, Alexey Kardashevskiy wrote: >>> At the moment when running in KVM mode, QEMU registers "host" class t= o >>> match the current CPU PVR value. It also registers another CPU class >>> with a CPU family name os if we run QEMU on POWER7 machine, "host" an= d >>> "POWER7" classes are created, this way we can always use "-cpu POWER7= " >>> on the actual POWER7 machine. >>> >>> The existing code uses DeviceClass::desc field of the CPU class as >>> a source for the class name; it was pointed out that it is wrong to u= se >>> user-visible string as a type name. >>> >>> This adds a common CPU class name into PowerPCCPUClass struct. >>> This makes registration of a CPU named after the family conditional - >>> PowerPCCPUClass::common_cpu_name has to be non-zero. Only POWER7/POWE= R8 >>> families have this field initialized by now. >>> >>> Signed-off-by: Alexey Kardashevskiy >> >> LGTM. Andreas, do you agree? >=20 >=20 > Ping? No, I don't agree. Inventing a new class field just to distinguish POWER7/POWER8 here seems like a weird idea, and the code placement is not fixed either. I gathered that you want -cpu POWER7 and -cpu POWER8 to work on POWER8 hardware and -cpu POWER7 on POWER7, for migration purposes, correct? What exact PVRs have you tested on and why does it not work without those types despite the PVR masking? To investigate I need a test case. Is this just a question of the generic family type being abstract and needing an updated PVR value? Which other fields are actually used? Regards, Andreas --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Felix Imend=C3=B6rffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG N=C3=BCrnberg)