]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
cpu_map: Add POWER11 CPU model support
authorNarayana Murty N <nnmlinux@linux.ibm.com>
Tue, 13 May 2025 07:43:25 +0000 (03:43 -0400)
committerJán Tomko <jtomko@redhat.com>
Thu, 22 May 2025 13:23:22 +0000 (15:23 +0200)
Add support for the POWER11 CPU model in libvirt ppc64 CPU map. This
allows libvirt to recognize and handle guests that specify POWER11 as
the target CPU model when running on recent Power systems supporting
this architecture.

The addition includes:
- A new src/cpu_map/ppc64_POWER11.xml definition file describing the
  features and flags for POWER11 CPUs.
- Updates to src/cpu_map/index.xml and build system (meson) to include
  the new model.
- Test updates to qemucapabilitiesdata and qemuxmlconfdata to reflect
  the presence of POWER11 in supported CPU models.
- Adjustments to existing test XMLs to fix CPU model expectations
  and avoid mismatches during validation against QEMU output.

With this change, users can specify <model>POWER11</model> in guest CPU
configuration and have libvirt map it correctly to the corresponding
QEMU CPU model and capabilities.

Tested with:
- QEMU 10.0.0 on POWER11 host system
- Validated with updated domain capabilities and qemu capabilities tests

Signed-off-by: Narayana Murty N <nnmlinux@linux.ibm.com>
Tested-By: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Reviewed-By: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/cpu_map/index.xml
src/cpu_map/meson.build
src/cpu_map/ppc64_POWER11.xml [new file with mode: 0644]
tests/domaincapsdata/qemu_10.0.0.ppc64.xml
tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml
tests/qemuxmlconfdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.args
tests/qemuxmlconfdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.xml
tests/qemuxmlconfdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.args
tests/qemuxmlconfdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.xml
tests/qemuxmlconfdata/pseries-cpu-le.ppc64-latest.args
tests/qemuxmlconfdata/pseries-cpu-le.ppc64-latest.xml

index 87db338cee58511d6237c0c877e291e69ecb89b2..790c3b2f8333c0bae4cbb01f6b338764e8e18ee2 100644 (file)
       <include filename='ppc64_POWER8.xml'/>
       <include filename='ppc64_POWER9.xml'/>
       <include filename='ppc64_POWER10.xml'/>
+      <include filename='ppc64_POWER11.xml'/>
     </group>
 
     <group name='Freescale-based CPU models'>
index dee8441a1365b7d2d30fd91b97c5a6dfb6adbaf0..abf9c21e4f5e25183a5a47acdd846b58f9fd2b71 100644 (file)
@@ -17,6 +17,7 @@ cpumap_data = [
   'arm_vendors.xml',
   'index.xml',
   'ppc64_POWER10.xml',
+  'ppc64_POWER11.xml',
   'ppc64_POWER6.xml',
   'ppc64_POWER7.xml',
   'ppc64_POWER8.xml',
diff --git a/src/cpu_map/ppc64_POWER11.xml b/src/cpu_map/ppc64_POWER11.xml
new file mode 100644 (file)
index 0000000..6e8ae71
--- /dev/null
@@ -0,0 +1,6 @@
+<cpus>
+  <model name='POWER11'>
+    <vendor name='IBM'/>
+    <pvr value='0x00820000' mask='0xffff0000'/>
+  </model>
+</cpus>
index 3c864146eb11e1eb458a993d52ed010ecc70c487..ccedde63d1ce0d4ff706a6a068f2724cde49bc6a 100644 (file)
@@ -36,6 +36,7 @@
     </mode>
     <mode name='custom' supported='yes'>
       <model usable='unknown' vendor='IBM'>POWER10</model>
+      <model usable='unknown' vendor='IBM'>POWER11</model>
       <model usable='unknown' vendor='IBM'>POWER7</model>
       <model usable='unknown' vendor='IBM'>POWER8</model>
       <model usable='unknown' vendor='IBM'>POWER9</model>
index bd65a038f9e7edaf159954897e73719952ad8810..1afe4ff7f3caeb9a9fb30b5cecc30f7e663fdb0b 100644 (file)
   <cpu type='kvm' name='ppc' typename='604-powerpc64-cpu'/>
   <cpu type='kvm' name='ppc32' typename='604-powerpc64-cpu'/>
   <cpu type='kvm' name='ppc64' typename='970fx_v3.1-powerpc64-cpu'/>
-  <cpu type='kvm' name='power11' typename='host-powerpc64-cpu'/>
+  <cpu type='kvm' name='POWER11' typename='host-powerpc64-cpu'/>
   <cpu type='kvm' name='POWER10' typename='power10_v2.0-powerpc64-cpu'/>
   <cpu type='kvm' name='POWER9' typename='power9_v2.2-powerpc64-cpu'/>
   <cpu type='kvm' name='power8nvl' typename='power8nvl_v1.0-powerpc64-cpu'/>
   <cpu type='tcg' name='ppc' typename='604-powerpc64-cpu'/>
   <cpu type='tcg' name='ppc32' typename='604-powerpc64-cpu'/>
   <cpu type='tcg' name='ppc64' typename='970fx_v3.1-powerpc64-cpu'/>
-  <cpu type='tcg' name='power11' typename='power11_v2.0-powerpc64-cpu'/>
+  <cpu type='tcg' name='POWER11' typename='power11_v2.0-powerpc64-cpu'/>
   <cpu type='tcg' name='POWER10' typename='power10_v2.0-powerpc64-cpu'/>
   <cpu type='tcg' name='POWER9' typename='power9_v2.2-powerpc64-cpu'/>
   <cpu type='tcg' name='power8nvl' typename='power8nvl_v1.0-powerpc64-cpu'/>
index a98dd05b5b0518f07e3efc67ba252f94d4291f53..6390322e8c2653cd50e1dad6d0bba2bba26395c6 100644 (file)
@@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
 -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
 -machine pseries-3.1,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \
 -accel kvm \
--cpu power11 \
+-cpu POWER11 \
 -m size=4194304k \
 -object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":4294967296}' \
 -overcommit mem-lock=off \
index b4d23bbe5767635b989d38eff9c020c6457b9742..a751a64e1128046669f96ce50c7f8401b06ace1c 100644 (file)
@@ -9,7 +9,7 @@
     <boot dev='hd'/>
   </os>
   <cpu mode='custom' match='exact' check='none'>
-    <model fallback='forbid'>power11</model>
+    <model fallback='forbid'>POWER11</model>
   </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
index 21b51e76f6675891332986226f9e9ec8714fc91f..130c801fa6b01381718a2f82adbad3ca83130e8a 100644 (file)
@@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
 -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
 -machine pseries-4.2,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \
 -accel kvm \
--cpu power11 \
+-cpu POWER11 \
 -m size=4194304k \
 -object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":4294967296}' \
 -overcommit mem-lock=off \
index ff3ad5f9d421b4a9dd6e2546b8790e9a4368b021..168006a3dc23e818d1ff00b60395e3d0ab190cb3 100644 (file)
@@ -9,7 +9,7 @@
     <boot dev='hd'/>
   </os>
   <cpu mode='custom' match='exact' check='none'>
-    <model fallback='forbid'>power11</model>
+    <model fallback='forbid'>POWER11</model>
   </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
index 351702dcfd16001c55920e6ec3f33a6d8f47fcf8..7dbdc203597e340f006f8a3ddbba9788056cb7de 100644 (file)
@@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
 -machine pseries,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \
 -accel kvm \
--cpu power11 \
+-cpu POWER11 \
 -m size=524288k \
 -object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":536870912}' \
 -overcommit mem-lock=off \
index 1e67592876f671a7a5c6db8861c3d3fde3917fb8..c6f4f95690c614ca5973635721d341e58403d215 100644 (file)
@@ -9,7 +9,7 @@
     <boot dev='hd'/>
   </os>
   <cpu mode='custom' match='exact' check='none'>
-    <model fallback='forbid'>power11</model>
+    <model fallback='forbid'>POWER11</model>
   </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>