From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIFd0-0003fH-F2 for qemu-devel@nongnu.org; Wed, 29 Jun 2016 09:34:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIFcw-0003bC-4M for qemu-devel@nongnu.org; Wed, 29 Jun 2016 09:34:05 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:17638 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIFcv-0003ae-Vf for qemu-devel@nongnu.org; Wed, 29 Jun 2016 09:34:02 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u5TDTBt7077692 for ; Wed, 29 Jun 2016 09:34:00 -0400 Received: from e23smtp09.au.ibm.com (e23smtp09.au.ibm.com [202.81.31.142]) by mx0b-001b2d01.pphosted.com with ESMTP id 23uw5q3uk7-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 29 Jun 2016 09:33:59 -0400 Received: from localhost by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 Jun 2016 23:33:57 +1000 Date: Wed, 29 Jun 2016 19:03:49 +0530 From: Bharata B Rao Reply-To: bharata@linux.vnet.ibm.com References: <1467200246-32708-1-git-send-email-bharata@linux.vnet.ibm.com> <5773BED8.1030902@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5773BED8.1030902@redhat.com> Message-Id: <20160629133349.GA21596@in.ibm.com> Subject: Re: [Qemu-devel] [PATCH v0] spapr: Restore support for 970MP and POWER8NVL CPU cores List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, david@gibson.dropbear.id.au On Wed, Jun 29, 2016 at 02:28:08PM +0200, Thomas Huth wrote: > On 29.06.2016 13:37, Bharata B Rao wrote: > > Introduction of core based CPU hotplug for PowerPC sPAPR didn't > > add support for 970MP and POWER8NVL based core types. Add support for > > the same. > > > > While we are here, add support for explicit specification of POWER5+_v2.1 > > core type. > > > > Signed-off-by: Bharata B Rao > > --- > > hw/ppc/spapr_cpu_core.c | 20 ++++++++++++++++++-- > > 1 file changed, 18 insertions(+), 2 deletions(-) > > > > diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c > > index 2aa0dc5..e30b159 100644 > > --- a/hw/ppc/spapr_cpu_core.c > > +++ b/hw/ppc/spapr_cpu_core.c > > @@ -337,12 +337,15 @@ static void glue(glue(spapr_cpu_core_, _fname), _initfn(Object *obj)) \ > > core->cpu_class = oc; \ > > } > > > > +SPAPR_CPU_CORE_INITFN(970mp_v1.0, 970MP_v10); > > +SPAPR_CPU_CORE_INITFN(970mp_v1.1, 970MP_v11); > > SPAPR_CPU_CORE_INITFN(970_v2.2, 970); > > SPAPR_CPU_CORE_INITFN(POWER5+_v2.1, POWER5plus); > > SPAPR_CPU_CORE_INITFN(POWER7_v2.3, POWER7); > > SPAPR_CPU_CORE_INITFN(POWER7+_v2.1, POWER7plus); > > SPAPR_CPU_CORE_INITFN(POWER8_v2.0, POWER8); > > SPAPR_CPU_CORE_INITFN(POWER8E_v2.1, POWER8E); > > +SPAPR_CPU_CORE_INITFN(POWER8NVL_v1.0, POWER8NVL); > > > > typedef struct SPAPRCoreInfo { > > const char *name; > > @@ -350,10 +353,19 @@ typedef struct SPAPRCoreInfo { > > } SPAPRCoreInfo; > > > > static const SPAPRCoreInfo spapr_cores[] = { > > - /* 970 */ > > + /* 970 and aliaes */ > > + { .name = "970_v2.2", .initfn = spapr_cpu_core_970_initfn }, > > { .name = "970", .initfn = spapr_cpu_core_970_initfn }, > > > > - /* POWER5 */ > > + /* 970MP variants and aliases */ > > + { .name = "970MP_v1.0", .initfn = spapr_cpu_core_970MP_v10_initfn }, > > + { .name = "970mp_v1.0", .initfn = spapr_cpu_core_970MP_v10_initfn }, > > + { .name = "970MP_v1.1", .initfn = spapr_cpu_core_970MP_v11_initfn }, > > + { .name = "970mp_v1.1", .initfn = spapr_cpu_core_970MP_v11_initfn }, > > + { .name = "970mp", .initfn = spapr_cpu_core_970MP_v11_initfn }, > > Are the upper-case "970MP_v1.1" and "970MP_v1.0" lines required here? > According to target-ppc/cpu-models.c, these CPU models are always > spelled with lower-case letters in QEMU, aren't they? The .name here is used to build the type of spapr-cpu-core based on the CPU model specified. I saw that we support both -cpu 970MP_v1.1 and -cpu 970mp_v1.1 Same for v1.0 (but support only -cpu 970mp and not -cpu 970MP!) Hence the above lines are needed to register appropriate spapr-cpu-core types (970mp_v1.1-spapr-cpu-core or 970MP_v1.1-spapr-cpu-core) based on the CPU model specified. Regards, Bharata.