From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URlVn-0002Ut-5D for qemu-devel@nongnu.org; Mon, 15 Apr 2013 11:40:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URlVi-0007Ld-5g for qemu-devel@nongnu.org; Mon, 15 Apr 2013 11:40:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URlVh-0007IB-U4 for qemu-devel@nongnu.org; Mon, 15 Apr 2013 11:40:02 -0400 Date: Mon, 15 Apr 2013 17:34:58 +0200 From: Igor Mammedov Message-ID: <20130415173458.5b03cc61@nial.usersys.redhat.com> In-Reply-To: <516C1BB4.5050607@suse.de> References: <1365691918-30594-1-git-send-email-imammedo@redhat.com> <1365691918-30594-9-git-send-email-imammedo@redhat.com> <516C1BB4.5050607@suse.de> 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: Andreas =?ISO-8859-1?B?RuRyYmVy?= Cc: aliguori@us.ibm.com, ehabkost@redhat.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, lig.fnst@cn.fujitsu.com, rth@twiddle.net On Mon, 15 Apr 2013 17:24:36 +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. arch is there to explicitly show that returned ID is defined by target and not generic code. This method then allow to implement cpu_exists() and helps to init present cpus bitmap in acpi_piix4. Would be cpu_id() acceptable? >=20 > Andreas >=20