From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URq7e-0002PW-45 for qemu-devel@nongnu.org; Mon, 15 Apr 2013 16:35:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URq7b-0001Fk-MR for qemu-devel@nongnu.org; Mon, 15 Apr 2013 16:35:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URq7b-0001FY-Db for qemu-devel@nongnu.org; Mon, 15 Apr 2013 16:35:27 -0400 Date: Mon, 15 Apr 2013 22:34:59 +0200 From: Igor Mammedov Message-ID: <20130415223459.3c3d8f21@thinkpad> In-Reply-To: <20130415154752.GG2719@otherpad.lan.raisama.net> References: <1365691918-30594-1-git-send-email-imammedo@redhat.com> <1365691918-30594-9-git-send-email-imammedo@redhat.com> <516C1BB4.5050607@suse.de> <20130415154752.GG2719@otherpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 08/19] cpu: introduce get_arch_id() method and override it for target-i386 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: aliguori@us.ibm.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, aderumier@odiso.com, lcapitulino@redhat.com, jfrei@linux.vnet.ibm.com, yang.z.zhang@intel.com, pbonzini@redhat.com, Andreas =?ISO-8859-1?B?RuRyYmVy?= , lig.fnst@cn.fujitsu.com, rth@twiddle.net On Mon, 15 Apr 2013 12:47:52 -0300 Eduardo Habkost wrote: > On Mon, Apr 15, 2013 at 05:24:36PM +0200, Andreas F=E4rber wrote: > > Am 11.04.2013 16:51, schrieb Igor Mammedov: > > > get_arch_id() adds possibility for generic code to get guest visible > > > CPI id without accessing CPUArchState. If target doesn't override it, > > > it will return cpu_index. > > >=20 > > > Override it on target-i386 to return APIC ID. > > >=20 > > > Signed-off-by: Igor Mammedov > > > --- > > > * it will be used later by new cpu_exists() generic function and > > > acpi_piix. > > > * s/cpu_firmware_id/cpu_arch_id/ > > > --- > > > include/qom/cpu.h | 2 ++ > > > qom/cpu.c | 6 ++++++ > > > target-i386/cpu.c | 10 ++++++++++ > > > 3 files changed, 18 insertions(+) > >=20 > > I'm still unclear about this ID topic, but please don't add QOM methods > > with arch_ in the name. The arch is expressed through subclasses. >=20 > The naming seemed appropriate to me as it is an abstract method that is > expected to have arch-specific implementations and arch-specific > meaning. >=20 > On the other hand, "firmware_id" looked clearer to me (as it was very > specific about the meaning/usefulness of the return value), I don't know > what was the original reason to change from firmware_id to arch_id. Objection here http://lists.nongnu.org/archive/html/qemu-devel/2013-04/msg01332.html In case of x86, it might be firmware defined id, but in general case it mig= ht be not the case, since it could be hardwired into CPU. So get_arch_id() seems more appropriate. >=20 > Other than "arch_id" and "firmware_id , I don't know how we could name > that method. It's not "just an ID", but a special kind of ID, so I > believe just "cpu_id" wouldn't work. >=20 > --=20 > Eduardo >=20 --=20 Regards, Igor