qemu: capabilities: Always assume QEMU_CAPS_QUERY_QMP_SCHEMA

All supported qemu versions have 'query-qmp-schema' so we can remove the
check whether it exists and all logic conntected to it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Peter Krempa 2021-04-07 16:10:14 +02:00
parent 7b23eb4b8a
commit 6073378990
38 changed files with 1 additions and 73 deletions

View File

@ -1163,7 +1163,6 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
{ "rtc-reset-reinjection", QEMU_CAPS_RTC_RESET_REINJECTION },
{ "migrate-incoming", QEMU_CAPS_INCOMING_DEFER },
{ "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 },
{ "query-named-block-nodes", QEMU_CAPS_QUERY_NAMED_BLOCK_NODES },
@ -2560,36 +2559,6 @@ virQEMUCapsProbeQMPCommands(virQEMUCaps *qemuCaps,
ncommands, commands);
virStringListFreeCount(commands, ncommands);
/* Probe for active commit of qemu 2.1. We don't need to query directly
* if we have QMP schema support */
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_QMP_SCHEMA) &&
qemuMonitorSupportsActiveCommit(mon))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_ACTIVE_COMMIT);
return 0;
}
static int
virQEMUCapsProbeQMPEvents(virQEMUCaps *qemuCaps,
qemuMonitor *mon)
{
char **events = NULL;
int nevents;
/* we can probe events also from the QMP schema so we can skip this here */
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_QMP_SCHEMA))
return 0;
if ((nevents = qemuMonitorGetEvents(mon, &events)) < 0)
return -1;
virQEMUCapsProcessStringFlags(qemuCaps,
G_N_ELEMENTS(virQEMUCapsEvents),
virQEMUCapsEvents,
nevents, events);
virStringListFreeCount(events, nevents);
return 0;
}
@ -5243,9 +5212,6 @@ virQEMUCapsProbeQMPSchemaCapabilities(virQEMUCaps *qemuCaps,
GHashTable *schema = NULL;
size_t i;
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_QMP_SCHEMA))
return 0;
if (!(schemareply = qemuMonitorQueryQMPSchema(mon)))
return -1;
@ -5337,8 +5303,6 @@ virQEMUCapsInitQMPMonitor(virQEMUCaps *qemuCaps,
type = virQEMUCapsGetVirtType(qemuCaps);
accel = virQEMUCapsGetAccel(qemuCaps, type);
if (virQEMUCapsProbeQMPEvents(qemuCaps, mon) < 0)
return -1;
if (virQEMUCapsProbeQMPObjectTypes(qemuCaps, mon) < 0)
return -1;
if (virQEMUCapsProbeQMPDeviceProperties(qemuCaps, mon) < 0)

View File

@ -380,7 +380,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
QEMU_CAPS_DRIVE_IOTUNE_MAX_LENGTH, /* -drive bps_max_length = and friends */
QEMU_CAPS_DEVICE_IVSHMEM_PLAIN, /* -device ivshmem-plain */
QEMU_CAPS_DEVICE_IVSHMEM_DOORBELL, /* -device ivshmem-doorbell */
QEMU_CAPS_QUERY_QMP_SCHEMA, /* query-qmp-schema command */
X_QEMU_CAPS_QUERY_QMP_SCHEMA, /* query-qmp-schema command */
/* 240 */
QEMU_CAPS_GLUSTER_DEBUG_LEVEL, /* -drive gluster.debug_level={0..9} */

View File

@ -68,7 +68,6 @@
<flag name='query-hotpluggable-cpus'/>
<flag name='virtio-net.rx_queue_size'/>
<flag name='drive-iotune-max-length'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -135,7 +135,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -104,7 +104,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -99,7 +99,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -68,7 +68,6 @@
<flag name='query-hotpluggable-cpus'/>
<flag name='virtio-net.rx_queue_size'/>
<flag name='drive-iotune-max-length'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -133,7 +133,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -98,7 +98,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -55,7 +55,6 @@
<flag name='smm'/>
<flag name='query-hotpluggable-cpus'/>
<flag name='drive-iotune-max-length'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -55,7 +55,6 @@
<flag name='smm'/>
<flag name='query-hotpluggable-cpus'/>
<flag name='drive-iotune-max-length'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -70,7 +70,6 @@
<flag name='query-hotpluggable-cpus'/>
<flag name='virtio-net.rx_queue_size'/>
<flag name='drive-iotune-max-length'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -134,7 +134,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -99,7 +99,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -134,7 +134,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -106,7 +106,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -104,7 +104,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -111,7 +111,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -111,7 +111,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -70,7 +70,6 @@
<flag name='query-hotpluggable-cpus'/>
<flag name='virtio-net.rx_queue_size'/>
<flag name='drive-iotune-max-length'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -133,7 +133,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -133,7 +133,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -107,7 +107,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -104,7 +104,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -70,7 +70,6 @@
<flag name='query-hotpluggable-cpus'/>
<flag name='virtio-net.rx_queue_size'/>
<flag name='drive-iotune-max-length'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -134,7 +134,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -109,7 +109,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -105,7 +105,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -111,7 +111,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -134,7 +134,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -50,7 +50,6 @@
<flag name='smm'/>
<flag name='query-hotpluggable-cpus'/>
<flag name='drive-iotune-max-length'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='drive-iotune-group'/>
<flag name='spice-rendernode'/>

View File

@ -134,7 +134,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -108,7 +108,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -104,7 +104,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -110,7 +110,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -69,7 +69,6 @@
<flag name='query-hotpluggable-cpus'/>
<flag name='virtio-net.rx_queue_size'/>
<flag name='drive-iotune-max-length'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -134,7 +134,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>

View File

@ -133,7 +133,6 @@
<flag name='drive-iotune-max-length'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='query-qmp-schema'/>
<flag name='gluster.debug_level'/>
<flag name='vhost-scsi'/>
<flag name='drive-iotune-group'/>