Skip to contentSkip to conversation

ppc/pnv: Make Power11 as the default CPU

PATCH In review Aditya Gupta 4 participants 9 messages May 21 – May 23

lore
Share & tools
lore
#0 lore raw

cover ppc/pnv: Make Power11 as the default CPU

Overview
========

Power11 is the newest supported Power processor merged last year. Make it the default processor for PSeries and PowerNV.

Testing
=======
1. Git tree with patches: https://gitlab.com/adi-g15-ibm/qemu/-/tree/feat_default_p11
2. Gitlab Pipeline: https://gitlab.com/adi-g15-ibm/qemu/-/pipelines/2542576926/

Aditya Gupta (2):
ppc/pnv: Make PowerNV11 as the default powernv machine ppc/pseries: Make Power11 as default cpu for pseries

 hw/ppc/pnv.c   | 4 ++--
 hw/ppc/spapr.c | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.54.0
#1 lore raw

PATCH 1/2 ppc/pnv: Make PowerNV11 as the default powernv machine

With Power11 being the newest supported Power processor in QEMU, and sufficiently tested, set powernv machine as an alias to powernv11 machine

---
 hw/ppc/pnv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/ppc/pnv.c +2 -2
index 8306754d9ad8..9143f0aa6bc0 100644
@@ -3478,8 +3478,6 @@ static void pnv_machine_p10_common_class_init(ObjectClass *oc, const 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->max_smt_threads = 4;
@@ -3556,6 +3554,8 @@ static void pnv_machine_power11_class_init(ObjectClass *oc, const void *data)
     mc->desc = "IBM PowerNV (Non-Virtualized) Power11";
     mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power11_v2.0");
 
+    mc->alias = "powernv";
+
     object_class_property_add_bool(oc, "big-core",
                                    pnv_machine_get_big_core,
                                    pnv_machine_set_big_core);
Signature · 1 line
2.54.0
#2 lore raw

PATCH 2/2 ppc/pseries: Make Power11 as default cpu for pseries

In reply to Aditya Gupta

With Power11 being the newest support Power processor in QEMU, and sufficiently tested, make Power11 as default CPU type for pseries machine

Retain Power10 as default CPU for pseries-11.0 and older versions

---
 hw/ppc/spapr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/ppc/spapr.c +2 -1
index d40af312fae1..191f7431bdf5 100644
@@ -4644,7 +4644,7 @@ static void spapr_machine_class_init(ObjectClass *oc, const void *data)
     hc->unplug_request = spapr_machine_device_unplug_request;
     hc->unplug = spapr_machine_device_unplug;
 
-    mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power10_v2.0");
+    mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power11_v2.0");
     mc->has_hotpluggable_cpus = true;
     mc->nvdimm_supported = true;
     smc->resize_hpt_default = SPAPR_RESIZE_HPT_ENABLED;
@@ -4777,6 +4777,7 @@ static void spapr_machine_11_0_class_options(MachineClass *mc)
 {
     spapr_machine_11_1_class_options(mc);
     compat_props_add(mc->compat_props, hw_compat_11_0, hw_compat_11_0_len);
+    mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power10_v2.0");
 }
 
 DEFINE_SPAPR_MACHINE(11, 0);
Signature · 1 line
2.54.0
#3 lore raw
In reply to Aditya Gupta
Quoted 10 lines · Aditya Gupta

Overview
========

Power11 is the newest supported Power processor merged last year. Make it the default processor for PSeries and PowerNV.

Testing
=======
1. Git tree with patches: https://gitlab.com/adi-g15-ibm/qemu/-/tree/feat_default_p11
2. Gitlab Pipeline: https://gitlab.com/adi-g15-ibm/qemu/-/pipelines/2542576926/

Note: For qemu to successfully build, following patches by Amit are required: https://lore.kernel.org/qemu-devel/[email protected]/

- Aditya G

Reviewed-by Tested-by on the v1 series
#4 lore raw
In reply to Aditya Gupta

Hi Aditya,

Thanks for the patches.

Quoted 5 lines · Aditya Gupta

Overview
========

Power11 is the newest supported Power processor merged last year. Make it the default processor for PSeries and PowerNV.

I gave the patches a try and I see the default CPU without the patches is Power10 while with the patches, the default CPU becomes as Power11.

PowerNV:
========
Without the patches:
--------------------

  # cat /proc/cpuinfo
  processor	: 0
  cpu		: POWER10, altivec supported
  clock		: 3800.000000MHz
  revision	: 2.0 (pvr 0080 1200)

timebase : 512000000
platform : PowerNV
model : IBM PowerNV (emulated by qemu)
machine : PowerNV IBM PowerNV (emulated by qemu)
firmware : OPAL
MMU : Radix

With the patches:
-----------------

  # cat /proc/cpuinfo
  processor	: 0
  cpu		: Power11, altivec supported
  clock		: 3800.000000MHz
  revision	: 18.0 (pvr 0082 1200)

platform : PowerNV
model : IBM PowerNV (emulated by qemu)
machine : PowerNV IBM PowerNV (emulated by qemu)
firmware : OPAL
MMU : Radix

pSeries:
========

Without the patches:
--------------------

  # cat /proc/cpuinfo
  processor	: 0
  cpu		: POWER10 (architected), altivec supported
  clock		: 1000.000000MHz
  revision	: 2.0 (pvr 0080 1200)

timebase : 512000000
platform : pSeries
model : IBM pSeries (emulated by qemu)
machine : CHRP IBM pSeries (emulated by qemu)
MMU : Radix

With the patches:
-----------------

  # cat /proc/cpuinfo
  processor	: 0
  cpu		: Power11 (architected), altivec supported
  clock		: 1000.000000MHz
  revision	: 18.0 (pvr 0082 1200)

timebase : 512000000
platform : pSeries
model : IBM pSeries (emulated by qemu)
machine : CHRP IBM pSeries (emulated by qemu)
MMU : Radix

Also, the changes look good to me. Hence:

Thanks,
Amit

#5 lore raw
Quoted 75 lines · Amit Machhiwal

Hi Aditya,

Thanks for the patches.

Quoted 5 lines · Aditya Gupta

Overview
========

Power11 is the newest supported Power processor merged last year. Make it the default processor for PSeries and PowerNV.

I gave the patches a try and I see the default CPU without the patches is Power10 while with the patches, the default CPU becomes as Power11.

PowerNV:
========
Without the patches:
--------------------

   # cat /proc/cpuinfo
   processor	: 0
   cpu		: POWER10, altivec supported
   clock		: 3800.000000MHz
   revision	: 2.0 (pvr 0080 1200)

timebase : 512000000
platform : PowerNV
model : IBM PowerNV (emulated by qemu)
machine : PowerNV IBM PowerNV (emulated by qemu)
firmware : OPAL
MMU : Radix

With the patches:
-----------------

   # cat /proc/cpuinfo
   processor	: 0
   cpu		: Power11, altivec supported
   clock		: 3800.000000MHz
   revision	: 18.0 (pvr 0082 1200)

platform : PowerNV
model : IBM PowerNV (emulated by qemu)
machine : PowerNV IBM PowerNV (emulated by qemu)
firmware : OPAL
MMU : Radix

pSeries:
========

Without the patches:
--------------------

   # cat /proc/cpuinfo
   processor	: 0
   cpu		: POWER10 (architected), altivec supported
   clock		: 1000.000000MHz
   revision	: 2.0 (pvr 0080 1200)

timebase : 512000000
platform : pSeries
model : IBM pSeries (emulated by qemu)
machine : CHRP IBM pSeries (emulated by qemu)
MMU : Radix

With the patches:
-----------------

   # cat /proc/cpuinfo
   processor	: 0
   cpu		: Power11 (architected), altivec supported
   clock		: 1000.000000MHz
   revision	: 18.0 (pvr 0082 1200)

timebase : 512000000
platform : pSeries
model : IBM pSeries (emulated by qemu)
machine : CHRP IBM pSeries (emulated by qemu)
MMU : Radix

Quoted 4 lines

Also, the changes look good to me. Hence:

Thanks for the tags, Amit !

Tested-by on the v1 series
#6 lore raw
In reply to Aditya Gupta

Hi Aditya,

I've tested the Power11 default patches on both PSeries and PowerNV guests with various SMP topologies.

Testing Environment:
- Host: SLES 16.1
- Arch: ppc64le
- QEMU: emulator version 11.0.50

PSeries Guest Bringup
Status: Success
qemu-system-ppc64 -name test-vm -machine pseries,accel=kvm -m 4096 -smp 8,sockets=1,cores=8,threads=1 -nographic -serial mon:stdio -drive file=/var/lib/libvirt/images/sles161.qcow2,if=virtio,format=qcow2 -netdev bridge,id=net0,br=virbr0 -device virtio-net-pci,netdev=net0

PowerNV Guest Bringup
Status: Success
qemu-system-ppc64 -name test-vm -machine powernv -m 4096 -smp 8,sockets=1,cores=8,threads=1 -nographic -serial mon:stdio -kernel /boot/vmlinux-6.12.0-160099.36-default -initrd /boot/initrd-6.12.0-160099.36-default -append "root=/dev/sda2 rootwait console=hvc0" -device virtio-scsi-pci,id=scsi0 -drive file=/var/lib/libvirt/images/sles161.qcow2,if=none,id=drive0,format=qcow2 -device scsi-hd,bus=scsi0.0,drive=drive0 -netdev bridge,id=net0,br=virbr0 -device virtio-net-pci,netdev=net0

Different topologies tested for both pseries and powernv
Status: Success
-smp 8,sockets=1,cores=8,threads=1
-smp 8,sockets=1,cores=1,threads=8
-smp 8,sockets=8,cores=1,threads=1
-smp 4,sockets=1,cores=2,threads=2
-smp 4,sockets=2,cores=1,threads=2
-smp 4,sockets=2,cores=2,threads=1

Qemu Unit Test Results

Status: Success
Ok:                337
Fail:              0
Skipped:           9

Result: All tests passed successfully.

Thanks,
Misbah Anjum N

#7 lore raw
Quoted 27 lines · Misbah Anjum N

Hi Aditya,

I've tested the Power11 default patches on both PSeries and PowerNV guests with various SMP topologies.

Testing Environment:
- Host: SLES 16.1
- Arch: ppc64le
- QEMU: emulator version 11.0.50

PSeries Guest Bringup
Status: Success
qemu-system-ppc64 -name test-vm -machine pseries,accel=kvm -m 4096 -smp 8,sockets=1,cores=8,threads=1 -nographic -serial mon:stdio -drive file=/var/lib/libvirt/images/sles161.qcow2,if=virtio,format=qcow2 -netdev bridge,id=net0,br=virbr0 -device virtio-net-pci,netdev=net0

PowerNV Guest Bringup
Status: Success
qemu-system-ppc64 -name test-vm -machine powernv -m 4096 -smp 8,sockets=1,cores=8,threads=1 -nographic -serial mon:stdio -kernel /boot/vmlinux-6.12.0-160099.36-default -initrd /boot/initrd-6.12.0-160099.36-default -append "root=/dev/sda2 rootwait console=hvc0" -device virtio-scsi-pci,id=scsi0 -drive file=/var/lib/libvirt/images/sles161.qcow2,if=none,id=drive0,format=qcow2 -device scsi-hd,bus=scsi0.0,drive=drive0 -netdev bridge,id=net0,br=virbr0 -device virtio-net-pci,netdev=net0

Different topologies tested for both pseries and powernv
Status: Success

(quoted diff) +0 -6
-smp 8,sockets=1,cores=8,threads=1
-smp 8,sockets=1,cores=1,threads=8
-smp 8,sockets=8,cores=1,threads=1
-smp 4,sockets=1,cores=2,threads=2
-smp 4,sockets=2,cores=1,threads=2
-smp 4,sockets=2,cores=2,threads=1

Qemu Unit Test Results

Quoted 8 lines
Status: Success
Ok:                337
Fail:              0
Skipped:           9

Result: All tests passed successfully.

Thank you for the extensive testing, Misbah !

- Aditya G

#8 lore raw
In reply to Misbah Anjum N

Thanks Aditya, Amit and Misbah for the quick turnaround and bringing Power11 to default. I think it's time.

I am queuing this patch with minor updates:
- patch 1 title prefix changed from ppc/pseries to ppc/spapr to follow the convention
- Correcting Amit's email in Tested-by tag.

Thanks all once again!
Harsh

Quoted 39 lines · Misbah Anjum N

Hi Aditya,

I've tested the Power11 default patches on both PSeries and PowerNV guests with various SMP topologies.

Testing Environment:
- Host: SLES 16.1
- Arch: ppc64le
- QEMU: emulator version 11.0.50

PSeries Guest Bringup
Status: Success
qemu-system-ppc64 -name test-vm -machine pseries,accel=kvm -m 4096 -smp 8,sockets=1,cores=8,threads=1 -nographic -serial mon:stdio -drive file=/var/lib/libvirt/images/sles161.qcow2,if=virtio,format=qcow2 -netdev bridge,id=net0,br=virbr0 -device virtio-net-pci,netdev=net0

PowerNV Guest Bringup
Status: Success
qemu-system-ppc64 -name test-vm -machine powernv -m 4096 -smp 8,sockets=1,cores=8,threads=1 -nographic -serial mon:stdio -kernel /boot/vmlinux-6.12.0-160099.36-default -initrd /boot/initrd-6.12.0-160099.36-default -append "root=/dev/sda2 rootwait console=hvc0" -device virtio-scsi-pci,id=scsi0 -drive file=/var/lib/libvirt/images/sles161.qcow2,if=none,id=drive0,format=qcow2 -device scsi-hd,bus=scsi0.0,drive=drive0 -netdev bridge,id=net0,br=virbr0 -device virtio-net-pci,netdev=net0

Different topologies tested for both pseries and powernv
Status: Success

(quoted diff) +0 -6
-smp 8,sockets=1,cores=8,threads=1
-smp 8,sockets=1,cores=1,threads=8
-smp 8,sockets=8,cores=1,threads=1
-smp 4,sockets=1,cores=2,threads=2
-smp 4,sockets=2,cores=1,threads=2
-smp 4,sockets=2,cores=2,threads=1

Qemu Unit Test Results

Status: Success
Ok:                337
Fail:              0
Skipped:           9

Result: All tests passed successfully.

Thanks,
Misbah Anjum N