This capability enables two devices:
- pnv-phb4 device, the pcie-root controller for PowerNV9 domains
- pnv-phb4-root-port, the pcie-root-port model that is used with the
pnv-phb4 device.
As with the pnv-phb3 devices, these are also user creatable only after
QEMU 6.2.0 but the capability is available since 5.0.0, meaning that we
need to check QEMU version and arch manually before setting it.
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/qemu/qemu_capabilities.c | 6 +++++-
src/qemu/qemu_capabilities.h | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 +
6 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index dbd9065a99..12f296347d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -668,6 +668,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
/* 425 */
"pnv-phb3", /* QEMU_CAPS_DEVICE_PNV_PHB3 */
+ "pnv-phb4", /* QEMU_CAPS_DEVICE_PNV_PHB4 */
);
@@ -1405,6 +1406,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
{ "s390-pv-guest", QEMU_CAPS_S390_PV_GUEST },
{ "virtio-mem-pci", QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI },
{ "pnv-phb3", QEMU_CAPS_DEVICE_PNV_PHB3 },
+ { "pnv-phb4", QEMU_CAPS_DEVICE_PNV_PHB4 },
};
@@ -5252,8 +5254,10 @@ virQEMUCapsInitQMPVersionCaps(virQEMUCaps *qemuCaps)
* QEMU 6.2.0. The version value set here was taken from a
* binary post 6.2.0 release that has user creatable pnv-phb
* support. */
- if (qemuCaps->version <= 6002000 && ARCH_IS_PPC64(qemuCaps->arch))
+ if (qemuCaps->version <= 6002000 && ARCH_IS_PPC64(qemuCaps->arch))
{
virQEMUCapsClear(qemuCaps, QEMU_CAPS_DEVICE_PNV_PHB3);
+ virQEMUCapsClear(qemuCaps, QEMU_CAPS_DEVICE_PNV_PHB4);
+ }
}
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 47845fbc59..f0d6ba2018 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -643,6 +643,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check
*/
/* 425 */
QEMU_CAPS_DEVICE_PNV_PHB3, /* devices pnv-phb3 and pnv-phb3-root-port */
+ QEMU_CAPS_DEVICE_PNV_PHB4, /* devices pnv-phb4 and pnv-phb4-root-port */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
index adaa13f6e1..913c28e11b 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -187,6 +187,7 @@
<flag name='query-display-options'/>
<flag name='virtio-blk.queue-size'/>
<flag name='pnv-phb3'/>
+ <flag name='pnv-phb4'/>
<version>5000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900241</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml
index 4c3526f499..7a635a4743 100644
--- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml
@@ -191,6 +191,7 @@
<flag name='query-dirty-rate'/>
<flag name='calc-dirty-rate'/>
<flag name='pnv-phb3'/>
+ <flag name='pnv-phb4'/>
<version>5002000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900243</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
index 7dfe86ba30..6a5675105e 100644
--- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
@@ -202,6 +202,7 @@
<flag name='calc-dirty-rate'/>
<flag name='dirtyrate-param.mode'/>
<flag name='pnv-phb3'/>
+ <flag name='pnv-phb4'/>
<version>6002000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900244</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml
index 57c5ead7a4..9770707bca 100644
--- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml
@@ -203,6 +203,7 @@
<flag name='calc-dirty-rate'/>
<flag name='dirtyrate-param.mode'/>
<flag name='pnv-phb3'/>
+ <flag name='pnv-phb4'/>
<version>6002050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900243</microcodeVersion>
--
2.35.1