From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPASK-0000lI-0e for qemu-devel@nongnu.org; Mon, 08 Apr 2013 07:41:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPASH-0002EF-24 for qemu-devel@nongnu.org; Mon, 08 Apr 2013 07:41:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPASG-0002DF-QE for qemu-devel@nongnu.org; Mon, 08 Apr 2013 07:41:44 -0400 Date: Mon, 8 Apr 2013 13:41:31 +0200 From: Igor Mammedov Message-ID: <20130408134131.7aa4f997@nial.usersys.redhat.com> In-Reply-To: <1365386541.5674.36.camel@liguang.fnst.cn.fujitsu.com> References: <1365172636-28628-1-git-send-email-imammedo@redhat.com> <1365172636-28628-12-git-send-email-imammedo@redhat.com> <1365386541.5674.36.camel@liguang.fnst.cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 11/22] cpu: introduce get_firmware_id() method and override it for target-i386 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: li guang 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, afaerber@suse.de, rth@twiddle.net On Mon, 08 Apr 2013 10:02:21 +0800 li guang wrote: > =E5=9C=A8 2013-04-05=E4=BA=94=E7=9A=84 16:37 +0200=EF=BC=8CIgor Mammedov= =E5=86=99=E9=81=93=EF=BC=9A > > get_firmware_id() adds possibily 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. > > --- > > include/qom/cpu.h | 4 ++-- > > qom/cpu.c | 6 ++++++ > > target-i386/cpu.c | 10 ++++++++++ > > 3 files changed, 18 insertions(+), 2 deletions(-) > >=20 > > diff --git a/include/qom/cpu.h b/include/qom/cpu.h > > index 210aca3..0d33009 100644 > > --- a/include/qom/cpu.h > > +++ b/include/qom/cpu.h > > @@ -46,7 +46,7 @@ typedef struct CPUState CPUState; > > * @reset: Callback to reset the #CPUState to its initial state. > > * @do_interrupt: Callback for interrupt handling. > > * @resume: Callback for putting CPU in runable state > > - * @get_firmware_id: Callback for getting arch depended CPU id > > + * @get_firmware_id: Callback for getting arch depended CPU ID >=20 > get_firmware_id ? > seems obscure to me. > can't it be get_arch_cpuid? *_cpuid might be confused with cpuid term on x86, not sure athe it would be better. Perhaps then get_{arch|}_id() will be sufficient, since it's a meth= od of CPUClass and CPU is implied.