diff mbox series

[v2,09/10] ppc: Make Power11 as default cpu type for 'pseries' and 'powernv'

Message ID 20240426110023.733309-10-adityag@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series Power11 support for QEMU | expand

Commit Message

Aditya Gupta April 26, 2024, 11 a.m. UTC
Make Power11 as default cpu type for 'pseries' and 'powernv' machine type,
with Power11 being the newest supported Power processor in QEMU.

Cc: Cédric Le Goater <clg@kaod.org>
Cc: Daniel Henrique Barboza <danielhb413@gmail.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Frédéric Barrat <fbarrat@linux.ibm.com>
Cc: Harsh Prateek Bora <harshpb@linux.ibm.com>
Cc: Mahesh J Salgaonkar <mahesh@linux.ibm.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
---
 hw/ppc/pnv.c   | 4 ++--
 hw/ppc/spapr.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Cédric Le Goater April 26, 2024, 2:32 p.m. UTC | #1
On 4/26/24 13:00, Aditya Gupta wrote:
> Make Power11 as default cpu type for 'pseries' and 'powernv' machine type,
> with Power11 being the newest supported Power processor in QEMU.

This is too early. We should merge Power11 support first, possibly in 9.1,
and then change default in a future release, 9.2, 10.0

Thanks,

C.



> 
> Cc: Cédric Le Goater <clg@kaod.org>
> Cc: Daniel Henrique Barboza <danielhb413@gmail.com>
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Cc: Frédéric Barrat <fbarrat@linux.ibm.com>
> Cc: Harsh Prateek Bora <harshpb@linux.ibm.com>
> Cc: Mahesh J Salgaonkar <mahesh@linux.ibm.com>
> Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
> ---
>   hw/ppc/pnv.c   | 4 ++--
>   hw/ppc/spapr.c | 2 +-
>   2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> index 06e272f3bdd3..0c5a6bc424af 100644
> --- a/hw/ppc/pnv.c
> +++ b/hw/ppc/pnv.c
> @@ -2531,8 +2531,6 @@ static void pnv_machine_p10_common_class_init(ObjectClass *oc, void *data)
>       mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power10_v2.0");
>       compat_props_add(mc->compat_props, phb_compat, G_N_ELEMENTS(phb_compat));
>   
> -    mc->alias = "powernv";
> -
>       pmc->compat = compat;
>       pmc->compat_size = sizeof(compat);
>       pmc->dt_power_mgt = pnv_dt_power_mgt;
> @@ -2569,6 +2567,8 @@ static void pnv_machine_power11_class_init(ObjectClass *oc, void *data)
>       /* do power10_class_init as p11 core is same as p10 */
>       pnv_machine_p10_common_class_init(oc, data);
>   
> +    mc->alias = "powernv";
> +
>       mc->desc = "IBM PowerNV (Non-Virtualized) POWER11";
>       mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power11");
>   
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index d2d1e310a3be..1c3e2da8e9e4 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -4698,7 +4698,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
>   
>       smc->dr_lmb_enabled = true;
>       smc->update_dt_enabled = true;
> -    mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power10_v2.0");
> +    mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power11");
>       mc->has_hotpluggable_cpus = true;
>       mc->nvdimm_supported = true;
>       smc->resize_hpt_default = SPAPR_RESIZE_HPT_ENABLED;
Aditya Gupta April 26, 2024, 5:40 p.m. UTC | #2
On Fri, Apr 26, 2024 at 04:32:18PM +0200, Cédric Le Goater wrote:
> On 4/26/24 13:00, Aditya Gupta wrote:
> > Make Power11 as default cpu type for 'pseries' and 'powernv' machine type,
> > with Power11 being the newest supported Power processor in QEMU.
> 
> This is too early. We should merge Power11 support first, possibly in 9.1,
> and then change default in a future release, 9.2, 10.0

Okay, makes sense.

I will drop this change from v3.

Thanks,
- Aditya Gupta

> 
> Thanks,
> 
> C.
> 
> 
> 
> > 
> > Cc: Cédric Le Goater <clg@kaod.org>
> > Cc: Daniel Henrique Barboza <danielhb413@gmail.com>
> > Cc: David Gibson <david@gibson.dropbear.id.au>
> > Cc: Frédéric Barrat <fbarrat@linux.ibm.com>
> > Cc: Harsh Prateek Bora <harshpb@linux.ibm.com>
> > Cc: Mahesh J Salgaonkar <mahesh@linux.ibm.com>
> > Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
> > Cc: Nicholas Piggin <npiggin@gmail.com>
> > Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
> > ---
> >   hw/ppc/pnv.c   | 4 ++--
> >   hw/ppc/spapr.c | 2 +-
> >   2 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> > index 06e272f3bdd3..0c5a6bc424af 100644
> > --- a/hw/ppc/pnv.c
> > +++ b/hw/ppc/pnv.c
> > @@ -2531,8 +2531,6 @@ static void pnv_machine_p10_common_class_init(ObjectClass *oc, void *data)
> >       mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power10_v2.0");
> >       compat_props_add(mc->compat_props, phb_compat, G_N_ELEMENTS(phb_compat));
> > -    mc->alias = "powernv";
> > -
> >       pmc->compat = compat;
> >       pmc->compat_size = sizeof(compat);
> >       pmc->dt_power_mgt = pnv_dt_power_mgt;
> > @@ -2569,6 +2567,8 @@ static void pnv_machine_power11_class_init(ObjectClass *oc, void *data)
> >       /* do power10_class_init as p11 core is same as p10 */
> >       pnv_machine_p10_common_class_init(oc, data);
> > +    mc->alias = "powernv";
> > +
> >       mc->desc = "IBM PowerNV (Non-Virtualized) POWER11";
> >       mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power11");
> > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> > index d2d1e310a3be..1c3e2da8e9e4 100644
> > --- a/hw/ppc/spapr.c
> > +++ b/hw/ppc/spapr.c
> > @@ -4698,7 +4698,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
> >       smc->dr_lmb_enabled = true;
> >       smc->update_dt_enabled = true;
> > -    mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power10_v2.0");
> > +    mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power11");
> >       mc->has_hotpluggable_cpus = true;
> >       mc->nvdimm_supported = true;
> >       smc->resize_hpt_default = SPAPR_RESIZE_HPT_ENABLED;
>
David Gibson April 29, 2024, 1:44 a.m. UTC | #3
On Fri, Apr 26, 2024 at 04:32:18PM +0200, Cédric le Goater wrote:
> On 4/26/24 13:00, Aditya Gupta wrote:
> > Make Power11 as default cpu type for 'pseries' and 'powernv' machine type,
> > with Power11 being the newest supported Power processor in QEMU.
> 
> This is too early. We should merge Power11 support first, possibly in 9.1,
> and then change default in a future release, 9.2, 10.0

Additionally, changes to defaults in pseries must be versioned, so
that the behaviour of existing machine types won't change.

> 
> Thanks,
> 
> C.
> 
> 
> 
> > 
> > Cc: Cédric Le Goater <clg@kaod.org>
> > Cc: Daniel Henrique Barboza <danielhb413@gmail.com>
> > Cc: David Gibson <david@gibson.dropbear.id.au>
> > Cc: Frédéric Barrat <fbarrat@linux.ibm.com>
> > Cc: Harsh Prateek Bora <harshpb@linux.ibm.com>
> > Cc: Mahesh J Salgaonkar <mahesh@linux.ibm.com>
> > Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
> > Cc: Nicholas Piggin <npiggin@gmail.com>
> > Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
> > ---
> >   hw/ppc/pnv.c   | 4 ++--
> >   hw/ppc/spapr.c | 2 +-
> >   2 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> > index 06e272f3bdd3..0c5a6bc424af 100644
> > --- a/hw/ppc/pnv.c
> > +++ b/hw/ppc/pnv.c
> > @@ -2531,8 +2531,6 @@ static void pnv_machine_p10_common_class_init(ObjectClass *oc, void *data)
> >       mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power10_v2.0");
> >       compat_props_add(mc->compat_props, phb_compat, G_N_ELEMENTS(phb_compat));
> > -    mc->alias = "powernv";
> > -
> >       pmc->compat = compat;
> >       pmc->compat_size = sizeof(compat);
> >       pmc->dt_power_mgt = pnv_dt_power_mgt;
> > @@ -2569,6 +2567,8 @@ static void pnv_machine_power11_class_init(ObjectClass *oc, void *data)
> >       /* do power10_class_init as p11 core is same as p10 */
> >       pnv_machine_p10_common_class_init(oc, data);
> > +    mc->alias = "powernv";
> > +
> >       mc->desc = "IBM PowerNV (Non-Virtualized) POWER11";
> >       mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power11");
> > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> > index d2d1e310a3be..1c3e2da8e9e4 100644
> > --- a/hw/ppc/spapr.c
> > +++ b/hw/ppc/spapr.c
> > @@ -4698,7 +4698,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
> >       smc->dr_lmb_enabled = true;
> >       smc->update_dt_enabled = true;
> > -    mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power10_v2.0");
> > +    mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power11");
> >       mc->has_hotpluggable_cpus = true;
> >       mc->nvdimm_supported = true;
> >       smc->resize_hpt_default = SPAPR_RESIZE_HPT_ENABLED;
>
Aditya Gupta May 1, 2024, 1:29 p.m. UTC | #4
Hello David,

On 29/04/24 07:14, David Gibson wrote:
> On Fri, Apr 26, 2024 at 04:32:18PM +0200, Cédric le Goater wrote:
>> On 4/26/24 13:00, Aditya Gupta wrote:
>>> Make Power11 as default cpu type for 'pseries' and 'powernv' machine type,
>>> with Power11 being the newest supported Power processor in QEMU.
>> This is too early. We should merge Power11 support first, possibly in 9.1,
>> and then change default in a future release, 9.2, 10.0
> Additionally, changes to defaults in pseries must be versioned, so
> that the behaviour of existing machine types won't change.

Sure, will take care when pseries default changes in future.


Thanks,

- Aditya Gupta
Nicholas Piggin May 3, 2024, 4:52 a.m. UTC | #5
On Sat Apr 27, 2024 at 12:32 AM AEST, Cédric Le Goater wrote:
> On 4/26/24 13:00, Aditya Gupta wrote:
> > Make Power11 as default cpu type for 'pseries' and 'powernv' machine type,
> > with Power11 being the newest supported Power processor in QEMU.
>
> This is too early. We should merge Power11 support first, possibly in 9.1,
> and then change default in a future release, 9.2, 10.0

Agree. Since P10 is the released chip that is what users will want
to use. Developers can set -cpu by hand.

Thanks,
Nick
Aditya Gupta May 3, 2024, 6:53 a.m. UTC | #6
On 03/05/24 10:22, Nicholas Piggin wrote:

> On Sat Apr 27, 2024 at 12:32 AM AEST, Cédric Le Goater wrote:
>> On 4/26/24 13:00, Aditya Gupta wrote:
>>> Make Power11 as default cpu type for 'pseries' and 'powernv' machine type,
>>> with Power11 being the newest supported Power processor in QEMU.
>> This is too early. We should merge Power11 support first, possibly in 9.1,
>> and then change default in a future release, 9.2, 10.0
> Agree. Since P10 is the released chip that is what users will want
> to use. Developers can set -cpu by hand.

Yes. I have dropped that patch from my v3.


About v3, I am blocked on a issue due to PCR values being same for P10 & 
P11. Will post the series after that gets sorted out.


Thanks,

Aditya Gupta

> Thanks,
> Nick
diff mbox series

Patch

diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 06e272f3bdd3..0c5a6bc424af 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -2531,8 +2531,6 @@  static void pnv_machine_p10_common_class_init(ObjectClass *oc, void *data)
     mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power10_v2.0");
     compat_props_add(mc->compat_props, phb_compat, G_N_ELEMENTS(phb_compat));
 
-    mc->alias = "powernv";
-
     pmc->compat = compat;
     pmc->compat_size = sizeof(compat);
     pmc->dt_power_mgt = pnv_dt_power_mgt;
@@ -2569,6 +2567,8 @@  static void pnv_machine_power11_class_init(ObjectClass *oc, void *data)
     /* do power10_class_init as p11 core is same as p10 */
     pnv_machine_p10_common_class_init(oc, data);
 
+    mc->alias = "powernv";
+
     mc->desc = "IBM PowerNV (Non-Virtualized) POWER11";
     mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power11");
 
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index d2d1e310a3be..1c3e2da8e9e4 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4698,7 +4698,7 @@  static void spapr_machine_class_init(ObjectClass *oc, void *data)
 
     smc->dr_lmb_enabled = true;
     smc->update_dt_enabled = true;
-    mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power10_v2.0");
+    mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power11");
     mc->has_hotpluggable_cpus = true;
     mc->nvdimm_supported = true;
     smc->resize_hpt_default = SPAPR_RESIZE_HPT_ENABLED;