1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

qemu: skip QMP probing of CPU definitions when missing

This unbreaks emulators that don't support this command such as
qemu-system-mips*.

Reference: http://bugs.debian.org/854125
This commit is contained in:
Guido Günther 2017-03-16 09:19:02 +01:00
parent 9dba52efd2
commit 009c07b9f2
20 changed files with 27 additions and 0 deletions

View File

@ -361,6 +361,8 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"spice-rendernode",
"nvdimm",
"pcie-root-port",
"query-cpu-definitions", /* 250 */
);
@ -1518,6 +1520,7 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
{ "query-hotpluggable-cpus", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS },
{ "query-qmp-schema", QEMU_CAPS_QUERY_QMP_SCHEMA },
{ "query-cpu-model-expansion", QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION},
{ "query-cpu-definitions", QEMU_CAPS_QUERY_CPU_DEFINITIONS},
};
struct virQEMUCapsStringFlags virQEMUCapsMigration[] = {
@ -2796,6 +2799,9 @@ virQEMUCapsProbeQMPCPUDefinitions(virQEMUCapsPtr qemuCaps,
int ret = -1;
size_t i;
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_DEFINITIONS))
return 0;
if ((ncpus = qemuMonitorGetCPUDefinitions(mon, &cpus)) < 0)
return -1;

View File

@ -397,6 +397,9 @@ typedef enum {
QEMU_CAPS_DEVICE_NVDIMM, /* -device nvdimm */
QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, /* -device pcie-root-port */
/* 250 */
QEMU_CAPS_QUERY_CPU_DEFINITIONS, /* qmp query-cpu-definitions */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;

View File

@ -109,6 +109,7 @@
<flag name='qxl.vram64_size_mb'/>
<flag name='device-tray-moved-event'/>
<flag name='display'/>
<flag name='query-cpu-definitions'/>
<version>1002002</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -127,6 +127,7 @@
<flag name='device-tray-moved-event'/>
<flag name='nec-usb-xhci-ports'/>
<flag name='display'/>
<flag name='query-cpu-definitions'/>
<version>1003001</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -128,6 +128,7 @@
<flag name='device-tray-moved-event'/>
<flag name='nec-usb-xhci-ports'/>
<flag name='display'/>
<flag name='query-cpu-definitions'/>
<version>1004002</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -139,6 +139,7 @@
<flag name='nec-usb-xhci-ports'/>
<flag name='display'/>
<flag name='vhost-scsi'/>
<flag name='query-cpu-definitions'/>
<version>1005003</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -144,6 +144,7 @@
<flag name='nec-usb-xhci-ports'/>
<flag name='display'/>
<flag name='vhost-scsi'/>
<flag name='query-cpu-definitions'/>
<version>1006000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -146,6 +146,7 @@
<flag name='nec-usb-xhci-ports'/>
<flag name='display'/>
<flag name='vhost-scsi'/>
<flag name='query-cpu-definitions'/>
<version>1007000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -161,6 +161,7 @@
<flag name='drive-detect-zeroes'/>
<flag name='display'/>
<flag name='vhost-scsi'/>
<flag name='query-cpu-definitions'/>
<version>2001001</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -182,6 +182,7 @@
<flag name='virtio-vga'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>
<flag name='query-cpu-definitions'/>
<version>2004000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -188,6 +188,7 @@
<flag name='query-qmp-schema'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>
<flag name='query-cpu-definitions'/>
<version>2005000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -164,6 +164,7 @@
<flag name='query-qmp-schema'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>
<flag name='query-cpu-definitions'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -164,6 +164,7 @@
<flag name='query-qmp-schema'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>
<flag name='query-cpu-definitions'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -159,6 +159,7 @@
<flag name='query-qmp-schema'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>
<flag name='query-cpu-definitions'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -197,6 +197,7 @@
<flag name='query-qmp-schema'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>
<flag name='query-cpu-definitions'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -127,6 +127,7 @@
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>
<flag name='query-cpu-definitions'/>
<version>2007000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -199,6 +199,7 @@
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>
<flag name='query-cpu-definitions'/>
<version>2007000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.7.0)</package>

View File

@ -129,6 +129,7 @@
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>
<flag name='query-cpu-model-expansion'/>
<flag name='query-cpu-definitions'/>
<version>2007093</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -200,6 +200,7 @@
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>
<flag name='query-cpu-definitions'/>
<version>2008000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.8.0)</package>

View File

@ -203,6 +203,7 @@
<flag name='query-cpu-model-expansion'/>
<flag name='virtio-net.host_mtu'/>
<flag name='pcie-root-port'/>
<flag name='query-cpu-definitions'/>
<version>2008050</version>
<kvmVersion>0</kvmVersion>
<package> (v2.8.0-1961-g5b10b94bd5)</package>