]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Add capability for pseries machine's max-cpu-compat= parameter
authorShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
Fri, 5 Jan 2018 13:47:46 +0000 (19:17 +0530)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 5 Jan 2018 16:00:58 +0000 (17:00 +0100)
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml

index abf02a9b174fae672a50fd5412d16e2e0f17fbe7..ab0ea8ec0d9242ced829264889adf276babf12a7 100644 (file)
@@ -456,6 +456,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
 
               /* 280 */
               "pl011",
+              "machine.pseries.max-cpu-compat",
     );
 
 
@@ -4859,6 +4860,12 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
     if (qemuCaps->version >= 2010000)
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_NUMA_DIST);
 
+    /* no way to query max-cpu-compat */
+    if (qemuCaps->version >= 2010000 &&
+        ARCH_IS_PPC64(qemuCaps->arch)) {
+        virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT);
+    }
+
     if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
         goto cleanup;
 
index 8bb0b6a2327e8d766eba61f94a0eadc371b8ce7e..3dfc77f8725cf58eaba8a82664f64c116a9ff485 100644 (file)
@@ -442,6 +442,7 @@ typedef enum {
 
     /* 280 */
     QEMU_CAPS_DEVICE_PL011, /* -device pl011 (not user-instantiable) */
+    QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT, /* -machine pseries,max-cpu-compat= */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
index c866ce3ee8e473572e8b30267cc08b2b81c06c18..7ca5234bb75426cf9d5b7c5ad6f909b9abb9afe0 100644 (file)
   <flag name='disk-share-rw'/>
   <flag name='iscsi.password-secret'/>
   <flag name='isa-serial'/>
+  <flag name='machine.pseries.max-cpu-compat'/>
   <version>2010000</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>383421</microcodeVersion>