1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

qemu: capabilities: Don't probe 'query-commands'

The capability code now probes the presence of commands from the QMP
schema instead of using 'query-commands'. Don't call the command and
adjust the '.replies' files.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2023-07-14 15:19:15 +02:00
parent d8b6801095
commit 0af5a514ee
36 changed files with 2770 additions and 23564 deletions

View File

@ -2601,19 +2601,6 @@ virQEMUCapsGetSGXCapabilities(virQEMUCaps *qemuCaps)
}
static int
virQEMUCapsProbeQMPCommands(virQEMUCaps *qemuCaps G_GNUC_UNUSED,
qemuMonitor *mon)
{
g_auto(GStrv) commands = NULL;
if (qemuMonitorGetCommands(mon, &commands) < 0)
return -1;
return 0;
}
static int
virQEMUCapsProbeQMPObjectTypes(virQEMUCaps *qemuCaps,
qemuMonitor *mon)
@ -5599,8 +5586,6 @@ virQEMUCapsInitQMPMonitor(virQEMUCaps *qemuCaps,
if (virQEMUCapsProbeQMPSchemaCapabilities(qemuCaps, mon) < 0)
return -1;
if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
return -1;
/* Some capabilities may differ depending on KVM state */
if (virQEMUCapsProbeQMPKVMState(qemuCaps, mon) < 0)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -14028,554 +14028,9 @@
"id": "libvirt-4"
}
{
"execute": "query-commands",
"id": "libvirt-5"
}
{
"return": [
{
"name": "object-add"
},
{
"name": "device_add"
},
{
"name": "query-qmp-schema"
},
{
"name": "query-vm-generation-id"
},
{
"name": "xen-load-devices-state"
},
{
"name": "query-acpi-ospm-status"
},
{
"name": "query-memory-devices"
},
{
"name": "query-command-line-options"
},
{
"name": "query-fdsets"
},
{
"name": "remove-fd"
},
{
"name": "add-fd"
},
{
"name": "query-memory-size-summary"
},
{
"name": "closefd"
},
{
"name": "getfd"
},
{
"name": "xen-set-global-dirty-log"
},
{
"name": "change"
},
{
"name": "human-monitor-command"
},
{
"name": "balloon"
},
{
"name": "inject-nmi"
},
{
"name": "system_wakeup"
},
{
"name": "x-exit-preconfig"
},
{
"name": "cont"
},
{
"name": "pmemsave"
},
{
"name": "memsave"
},
{
"name": "system_powerdown"
},
{
"name": "system_reset"
},
{
"name": "stop"
},
{
"name": "query-pci"
},
{
"name": "query-balloon"
},
{
"name": "query-iothreads"
},
{
"name": "query-uuid"
},
{
"name": "query-kvm"
},
{
"name": "query-name"
},
{
"name": "add_client"
},
{
"name": "set-numa-node"
},
{
"name": "query-hotpluggable-cpus"
},
{
"name": "query-memdev"
},
{
"name": "query-target"
},
{
"name": "query-current-machine"
},
{
"name": "query-machines"
},
{
"name": "cpu-add"
},
{
"name": "query-cpus-fast"
},
{
"name": "query-cpus"
},
{
"name": "device_del"
},
{
"name": "device-list-properties"
},
{
"name": "object-del"
},
{
"name": "qom-list-properties"
},
{
"name": "qom-list-types"
},
{
"name": "qom-set"
},
{
"name": "qom-get"
},
{
"name": "qom-list"
},
{
"name": "quit"
},
{
"name": "query-events"
},
{
"name": "query-commands"
},
{
"name": "query-version"
},
{
"name": "qmp_capabilities"
},
{
"name": "trace-event-set-state"
},
{
"name": "trace-event-get-state"
},
{
"name": "transaction"
},
{
"name": "migrate-pause"
},
{
"name": "migrate-recover"
},
{
"name": "query-colo-status"
},
{
"name": "xen-colo-do-checkpoint"
},
{
"name": "query-xen-replication-status"
},
{
"name": "xen-set-replication"
},
{
"name": "xen-save-devices-state"
},
{
"name": "migrate-incoming"
},
{
"name": "migrate"
},
{
"name": "query-migrate-cache-size"
},
{
"name": "migrate-set-cache-size"
},
{
"name": "migrate_set_speed"
},
{
"name": "migrate_set_downtime"
},
{
"name": "migrate-continue"
},
{
"name": "migrate_cancel"
},
{
"name": "x-colo-lost-heartbeat"
},
{
"name": "migrate-start-postcopy"
},
{
"name": "client_migrate_info"
},
{
"name": "query-migrate-parameters"
},
{
"name": "migrate-set-parameters"
},
{
"name": "query-migrate-capabilities"
},
{
"name": "migrate-set-capabilities"
},
{
"name": "query-migrate"
},
{
"name": "query-display-options"
},
{
"name": "input-send-event"
},
{
"name": "send-key"
},
{
"name": "query-mice"
},
{
"name": "change-vnc-password"
},
{
"name": "query-vnc-servers"
},
{
"name": "query-vnc"
},
{
"name": "query-spice"
},
{
"name": "screendump"
},
{
"name": "expire_password"
},
{
"name": "set_password"
},
{
"name": "query-tpm"
},
{
"name": "query-tpm-types"
},
{
"name": "query-tpm-models"
},
{
"name": "query-rocker-of-dpa-groups"
},
{
"name": "query-rocker-of-dpa-flows"
},
{
"name": "query-rocker-ports"
},
{
"name": "query-rocker"
},
{
"name": "announce-self"
},
{
"name": "query-rx-filter"
},
{
"name": "netdev_del"
},
{
"name": "netdev_add"
},
{
"name": "set_link"
},
{
"name": "query-dump-guest-memory-capability"
},
{
"name": "query-dump"
},
{
"name": "dump-guest-memory"
},
{
"name": "chardev-send-break"
},
{
"name": "chardev-remove"
},
{
"name": "chardev-change"
},
{
"name": "chardev-add"
},
{
"name": "ringbuf-read"
},
{
"name": "ringbuf-write"
},
{
"name": "query-chardev-backends"
},
{
"name": "query-chardev"
},
{
"name": "query-jobs"
},
{
"name": "job-finalize"
},
{
"name": "job-dismiss"
},
{
"name": "job-complete"
},
{
"name": "job-cancel"
},
{
"name": "job-resume"
},
{
"name": "job-pause"
},
{
"name": "blockdev-snapshot-delete-internal-sync"
},
{
"name": "blockdev-snapshot-internal-sync"
},
{
"name": "nbd-server-stop"
},
{
"name": "nbd-server-remove"
},
{
"name": "nbd-server-add"
},
{
"name": "nbd-server-start"
},
{
"name": "x-blockdev-set-iothread"
},
{
"name": "x-blockdev-change"
},
{
"name": "block-set-write-threshold"
},
{
"name": "x-blockdev-amend"
},
{
"name": "blockdev-create"
},
{
"name": "blockdev-del"
},
{
"name": "x-blockdev-reopen"
},
{
"name": "blockdev-add"
},
{
"name": "block-job-finalize"
},
{
"name": "block-job-dismiss"
},
{
"name": "block-job-complete"
},
{
"name": "block-job-resume"
},
{
"name": "block-job-pause"
},
{
"name": "block-job-cancel"
},
{
"name": "block-job-set-speed"
},
{
"name": "block-stream"
},
{
"name": "blockdev-mirror"
},
{
"name": "x-debug-block-dirty-bitmap-sha256"
},
{
"name": "block-dirty-bitmap-merge"
},
{
"name": "block-dirty-bitmap-disable"
},
{
"name": "block-dirty-bitmap-enable"
},
{
"name": "block-dirty-bitmap-clear"
},
{
"name": "block-dirty-bitmap-remove"
},
{
"name": "block-dirty-bitmap-add"
},
{
"name": "drive-mirror"
},
{
"name": "x-debug-query-block-graph"
},
{
"name": "query-named-block-nodes"
},
{
"name": "blockdev-backup"
},
{
"name": "drive-backup"
},
{
"name": "block-commit"
},
{
"name": "change-backing-file"
},
{
"name": "blockdev-snapshot"
},
{
"name": "blockdev-snapshot-sync"
},
{
"name": "block_resize"
},
{
"name": "block_passwd"
},
{
"name": "query-block-jobs"
},
{
"name": "query-blockstats"
},
{
"name": "query-block"
},
{
"name": "block-latency-histogram-set"
},
{
"name": "block_set_io_throttle"
},
{
"name": "blockdev-change-medium"
},
{
"name": "blockdev-insert-medium"
},
{
"name": "blockdev-remove-medium"
},
{
"name": "blockdev-close-tray"
},
{
"name": "blockdev-open-tray"
},
{
"name": "eject"
},
{
"name": "query-pr-managers"
},
{
"name": "watchdog-set-action"
},
{
"name": "query-status"
}
],
"id": "libvirt-5"
}
{
"execute": "query-kvm",
"id": "libvirt-6"
"id": "libvirt-5"
}
{
@ -14583,12 +14038,12 @@
"enabled": false,
"present": false
},
"id": "libvirt-6"
"id": "libvirt-5"
}
{
"execute": "qom-list-types",
"id": "libvirt-7"
"id": "libvirt-6"
}
{
@ -15214,7 +14669,7 @@
"parent": "sparc-cpu"
}
],
"id": "libvirt-7"
"id": "libvirt-6"
}
{
@ -15222,11 +14677,11 @@
"arguments": {
"typename": "virtio-blk-pci"
},
"id": "libvirt-8"
"id": "libvirt-7"
}
{
"id": "libvirt-8",
"id": "libvirt-7",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'virtio-blk-pci' not found"
@ -15238,7 +14693,7 @@
"arguments": {
"typename": "scsi-hd"
},
"id": "libvirt-9"
"id": "libvirt-8"
}
{
@ -15415,7 +14870,7 @@
"type": "int32"
}
],
"id": "libvirt-9"
"id": "libvirt-8"
}
{
@ -15423,11 +14878,11 @@
"arguments": {
"typename": "ide-hd"
},
"id": "libvirt-10"
"id": "libvirt-9"
}
{
"id": "libvirt-10",
"id": "libvirt-9",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'ide-hd' not found"
@ -15439,11 +14894,11 @@
"arguments": {
"typename": "PIIX4_PM"
},
"id": "libvirt-11"
"id": "libvirt-10"
}
{
"id": "libvirt-11",
"id": "libvirt-10",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'PIIX4_PM' not found"
@ -15455,7 +14910,7 @@
"arguments": {
"typename": "usb-redir"
},
"id": "libvirt-12"
"id": "libvirt-11"
}
{
@ -15513,7 +14968,7 @@
"type": "bool"
}
],
"id": "libvirt-12"
"id": "libvirt-11"
}
{
@ -15521,11 +14976,11 @@
"arguments": {
"typename": "kvm-pit"
},
"id": "libvirt-13"
"id": "libvirt-12"
}
{
"id": "libvirt-13",
"id": "libvirt-12",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'kvm-pit' not found"
@ -15537,11 +14992,11 @@
"arguments": {
"typename": "ICH9-LPC"
},
"id": "libvirt-14"
"id": "libvirt-13"
}
{
"id": "libvirt-14",
"id": "libvirt-13",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'ICH9-LPC' not found"
@ -15553,11 +15008,11 @@
"arguments": {
"typename": "virtio-balloon-pci"
},
"id": "libvirt-15"
"id": "libvirt-14"
}
{
"id": "libvirt-15",
"id": "libvirt-14",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'virtio-balloon-pci' not found"
@ -15569,11 +15024,11 @@
"arguments": {
"typename": "virtio-balloon-ccw"
},
"id": "libvirt-16"
"id": "libvirt-15"
}
{
"id": "libvirt-16",
"id": "libvirt-15",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'virtio-balloon-ccw' not found"
@ -15585,11 +15040,11 @@
"arguments": {
"typename": "virtio-balloon-device"
},
"id": "libvirt-17"
"id": "libvirt-16"
}
{
"id": "libvirt-17",
"id": "libvirt-16",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'virtio-balloon-device' not found"
@ -15601,11 +15056,11 @@
"arguments": {
"typename": "usb-host"
},
"id": "libvirt-18"
"id": "libvirt-17"
}
{
"id": "libvirt-18",
"id": "libvirt-17",
"error": {
"class": "DeviceNotFound",
"desc": "Device 'usb-host' not found"
@ -15617,7 +15072,7 @@
"arguments": {
"typename": "memory-backend-file"
},
"id": "libvirt-19"
"id": "libvirt-18"
}
{
@ -15687,7 +15142,7 @@
"type": "bool"
}
],
"id": "libvirt-19"
"id": "libvirt-18"
}
{
@ -15695,7 +15150,7 @@
"arguments": {
"typename": "memory-backend-memfd"
},
"id": "libvirt-20"
"id": "libvirt-19"
}
{
@ -15764,12 +15219,12 @@
"type": "int"
}
],
"id": "libvirt-20"
"id": "libvirt-19"
}
{
"execute": "query-machines",
"id": "libvirt-21"
"id": "libvirt-20"
}
{
@ -15863,7 +15318,7 @@
"deprecated": false
}
],
"id": "libvirt-21"
"id": "libvirt-20"
}
{
@ -15871,7 +15326,7 @@
"arguments": {
"typename": "none-machine"
},
"id": "libvirt-22"
"id": "libvirt-21"
}
{
@ -15961,34 +15416,34 @@
"type": "string"
}
],
"id": "libvirt-22"
"id": "libvirt-21"
}
{
"execute": "query-tpm-models",
"id": "libvirt-23"
"id": "libvirt-22"
}
{
"return": [
],
"id": "libvirt-23"
"id": "libvirt-22"
}
{
"execute": "query-tpm-types",
"id": "libvirt-24"
"id": "libvirt-23"
}
{
"return": [
],
"id": "libvirt-24"
"id": "libvirt-23"
}
{
"execute": "query-command-line-options",
"id": "libvirt-25"
"id": "libvirt-24"
}
{
@ -17273,12 +16728,12 @@
"option": "drive"
}
],
"id": "libvirt-25"
"id": "libvirt-24"
}
{
"execute": "query-migrate-capabilities",
"id": "libvirt-26"
"id": "libvirt-25"
}
{
@ -17356,5 +16811,5 @@
"capability": "validate-uuid"
}
],
"id": "libvirt-26"
"id": "libvirt-25"
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff