All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v0] spapr: Restore support for 970MP and POWER8NVL CPU cores
@ 2016-06-29 11:37 Bharata B Rao
  2016-06-29 12:28 ` Thomas Huth
  2016-06-30  0:46 ` David Gibson
  0 siblings, 2 replies; 4+ messages in thread
From: Bharata B Rao @ 2016-06-29 11:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-ppc, david, thuth, Bharata B Rao

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 <bharata@linux.vnet.ibm.com>
---
 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 },
+
+    /* POWER5 and aliases */
+    { .name = "POWER5+_v2.1", .initfn = spapr_cpu_core_POWER5plus_initfn },
     { .name = "POWER5+", .initfn = spapr_cpu_core_POWER5plus_initfn },
 
     /* POWER7 and aliases */
@@ -373,6 +385,10 @@ static const SPAPRCoreInfo spapr_cores[] = {
     { .name = "POWER8E_v2.1", .initfn = spapr_cpu_core_POWER8E_initfn },
     { .name = "POWER8E", .initfn = spapr_cpu_core_POWER8E_initfn },
 
+    /* POWER8NVL and aliases */
+    { .name = "POWER8NVL_v1.0", .initfn = spapr_cpu_core_POWER8NVL_initfn },
+    { .name = "POWER8NVL", .initfn = spapr_cpu_core_POWER8NVL_initfn },
+
     { .name = NULL }
 };
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v0] spapr: Restore support for 970MP and POWER8NVL CPU cores
  2016-06-29 11:37 [Qemu-devel] [PATCH v0] spapr: Restore support for 970MP and POWER8NVL CPU cores Bharata B Rao
@ 2016-06-29 12:28 ` Thomas Huth
  2016-06-29 13:33   ` Bharata B Rao
  2016-06-30  0:46 ` David Gibson
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2016-06-29 12:28 UTC (permalink / raw)
  To: Bharata B Rao, qemu-devel; +Cc: qemu-ppc, david

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 <bharata@linux.vnet.ibm.com>
> ---
>  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?

 Thomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v0] spapr: Restore support for 970MP and POWER8NVL CPU cores
  2016-06-29 12:28 ` Thomas Huth
@ 2016-06-29 13:33   ` Bharata B Rao
  0 siblings, 0 replies; 4+ messages in thread
From: Bharata B Rao @ 2016-06-29 13:33 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, qemu-ppc, david

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 <bharata@linux.vnet.ibm.com>
> > ---
> >  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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v0] spapr: Restore support for 970MP and POWER8NVL CPU cores
  2016-06-29 11:37 [Qemu-devel] [PATCH v0] spapr: Restore support for 970MP and POWER8NVL CPU cores Bharata B Rao
  2016-06-29 12:28 ` Thomas Huth
@ 2016-06-30  0:46 ` David Gibson
  1 sibling, 0 replies; 4+ messages in thread
From: David Gibson @ 2016-06-30  0:46 UTC (permalink / raw)
  To: Bharata B Rao; +Cc: qemu-devel, qemu-ppc, thuth

[-- Attachment #1: Type: text/plain, Size: 2994 bytes --]

On Wed, Jun 29, 2016 at 05:07:26PM +0530, 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 <bharata@linux.vnet.ibm.com>

Applied to ppc-for-2.7, thanks.

> ---
>  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 },
> +
> +    /* POWER5 and aliases */
> +    { .name = "POWER5+_v2.1", .initfn = spapr_cpu_core_POWER5plus_initfn },
>      { .name = "POWER5+", .initfn = spapr_cpu_core_POWER5plus_initfn },
>  
>      /* POWER7 and aliases */
> @@ -373,6 +385,10 @@ static const SPAPRCoreInfo spapr_cores[] = {
>      { .name = "POWER8E_v2.1", .initfn = spapr_cpu_core_POWER8E_initfn },
>      { .name = "POWER8E", .initfn = spapr_cpu_core_POWER8E_initfn },
>  
> +    /* POWER8NVL and aliases */
> +    { .name = "POWER8NVL_v1.0", .initfn = spapr_cpu_core_POWER8NVL_initfn },
> +    { .name = "POWER8NVL", .initfn = spapr_cpu_core_POWER8NVL_initfn },
> +
>      { .name = NULL }
>  };
>  

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-30  1:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29 11:37 [Qemu-devel] [PATCH v0] spapr: Restore support for 970MP and POWER8NVL CPU cores Bharata B Rao
2016-06-29 12:28 ` Thomas Huth
2016-06-29 13:33   ` Bharata B Rao
2016-06-30  0:46 ` David Gibson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.