[PATCH 0/6] qemu: Type-aware generation of properties for -device (part 3)
by Peter Krempa
Kevin's patches were committed upstream, so libvirt can start using the
JSON syntax now.
This patch adds also validation of the parameters against the
QMP schema, but the schema is incomplete for now.
Peter Krempa (6):
qemucapabilitiestest: Update qemu-6.2 cycle capability test data
testQEMUSchemaValidateCommand: Add possibility for partial QMP
validation
qemuMonitorTestProcessCommandDefaultValidate: Partially validate
'device_add'
qemu: Use JSON directly for '-device'
testCompareXMLToArgvValidateSchemaCommand: Add validation for
'-device'
NEWS: Mention conversion of '-device' to JSON starting with QEMU-6.2
NEWS.rst | 7 ++
src/qemu/qemu_capabilities.c | 1 +
.../caps_6.2.0.x86_64.replies | 99 ++++++++++---------
.../caps_6.2.0.x86_64.xml | 3 +-
tests/qemumigparamstest.c | 1 +
tests/qemumigrationcookiexmltest.c | 1 +
tests/qemumonitortestutils.c | 6 +-
.../audio-alsa-best.x86_64-latest.args | 4 +-
.../audio-alsa-full.x86_64-latest.args | 4 +-
.../audio-alsa-minimal.x86_64-latest.args | 4 +-
.../audio-coreaudio-best.x86_64-latest.args | 4 +-
.../audio-coreaudio-full.x86_64-latest.args | 4 +-
...audio-coreaudio-minimal.x86_64-latest.args | 4 +-
...udio-default-nographics.x86_64-latest.args | 4 +-
.../audio-default-sdl.x86_64-latest.args | 6 +-
.../audio-default-spice.x86_64-latest.args | 6 +-
.../audio-default-vnc.x86_64-latest.args | 6 +-
.../audio-file-best.x86_64-latest.args | 4 +-
.../audio-file-full.x86_64-latest.args | 4 +-
.../audio-file-minimal.x86_64-latest.args | 4 +-
.../audio-jack-full.x86_64-latest.args | 4 +-
.../audio-jack-minimal.x86_64-latest.args | 4 +-
.../audio-many-backends.x86_64-latest.args | 14 +--
.../audio-none-best.x86_64-latest.args | 4 +-
.../audio-none-full.x86_64-latest.args | 4 +-
.../audio-none-minimal.x86_64-latest.args | 4 +-
.../audio-oss-best.x86_64-latest.args | 4 +-
.../audio-oss-full.x86_64-latest.args | 4 +-
.../audio-oss-minimal.x86_64-latest.args | 4 +-
.../audio-pulseaudio-best.x86_64-latest.args | 4 +-
.../audio-pulseaudio-full.x86_64-latest.args | 4 +-
...udio-pulseaudio-minimal.x86_64-latest.args | 4 +-
.../audio-sdl-best.x86_64-latest.args | 4 +-
.../audio-sdl-full.x86_64-latest.args | 4 +-
.../audio-sdl-minimal.x86_64-latest.args | 4 +-
.../audio-spice-best.x86_64-latest.args | 4 +-
.../audio-spice-full.x86_64-latest.args | 4 +-
.../audio-spice-minimal.x86_64-latest.args | 4 +-
.../blkdeviotune-group-num.x86_64-latest.args | 8 +-
...blkdeviotune-max-length.x86_64-latest.args | 8 +-
.../blkdeviotune-max.x86_64-latest.args | 8 +-
.../channel-unix-guestfwd.x86_64-latest.args | 4 +-
.../console-virtio-unix.x86_64-latest.args | 10 +-
.../controller-virtio-scsi.x86_64-latest.args | 24 ++---
...-Icelake-Server-pconfig.x86_64-latest.args | 4 +-
.../cpu-host-model.x86_64-latest.args | 10 +-
.../cpu-translation.x86_64-latest.args | 4 +-
.../cputune-cpuset-big-id.x86_64-latest.args | 6 +-
.../devices-acpi-index.x86_64-latest.args | 16 +--
.../disk-aio-io_uring.x86_64-latest.args | 6 +-
.../disk-aio.x86_64-latest.args | 8 +-
...-backing-chains-noindex.x86_64-latest.args | 16 +--
.../disk-blockio.x86_64-latest.args | 8 +-
.../disk-boot-cdrom.x86_64-latest.args | 6 +-
.../disk-boot-disk.x86_64-latest.args | 6 +-
.../disk-cache.x86_64-latest.args | 14 +--
.../disk-cdrom-bus-other.x86_64-latest.args | 6 +-
...m-empty-network-invalid.x86_64-latest.args | 4 +-
.../disk-cdrom-network.x86_64-latest.args | 10 +-
.../disk-cdrom-tray.x86_64-latest.args | 10 +-
.../disk-cdrom.x86_64-latest.args | 10 +-
.../disk-copy_on_read.x86_64-latest.args | 12 +--
.../disk-detect-zeroes.x86_64-latest.args | 8 +-
.../disk-discard.x86_64-latest.args | 8 +-
.../disk-error-policy.x86_64-latest.args | 8 +-
.../disk-floppy-q35-2_11.x86_64-latest.args | 12 +--
.../disk-floppy-q35-2_9.x86_64-latest.args | 12 +--
.../disk-floppy-tray.x86_64-latest.args | 10 +-
.../disk-floppy.x86_64-latest.args | 8 +-
.../disk-fmt-qcow.x86_64-latest.args | 6 +-
.../disk-geometry.x86_64-latest.args | 6 +-
.../disk-ide-split.x86_64-latest.args | 8 +-
.../disk-ide-wwn.x86_64-latest.args | 6 +-
.../disk-ioeventfd.x86_64-latest.args | 12 +--
.../disk-metadata-cache.x86_64-latest.args | 8 +-
.../disk-network-gluster.x86_64-latest.args | 8 +-
.../disk-network-http.x86_64-latest.args | 10 +-
.../disk-network-iscsi.x86_64-latest.args | 18 ++--
.../disk-network-nbd.x86_64-latest.args | 12 +--
.../disk-network-nfs.x86_64-latest.args | 6 +-
...sk-network-rbd-no-colon.x86_64-latest.args | 8 +-
.../disk-network-rbd.x86_64-latest.args | 14 +--
...isk-network-source-auth.x86_64-latest.args | 8 +-
...isk-network-tlsx509-nbd.x86_64-latest.args | 4 +-
.../disk-no-boot.x86_64-latest.args | 8 +-
.../disk-nvme.x86_64-latest.args | 12 +--
.../disk-order.x86_64-latest.args | 12 +--
.../disk-readonly-disk.x86_64-latest.args | 8 +-
.../disk-rotation.x86_64-latest.args | 12 +--
.../disk-sata-device.x86_64-latest.args | 8 +-
.../disk-scsi-device-auto.x86_64-latest.args | 10 +-
.../disk-scsi-disk-split.x86_64-latest.args | 20 ++--
.../disk-scsi-disk-vpd.x86_64-latest.args | 12 +--
.../disk-scsi-disk-wwn.x86_64-latest.args | 12 +--
...sk-scsi-lun-passthrough.x86_64-latest.args | 12 +--
.../disk-scsi.x86_64-latest.args | 26 ++---
.../disk-serial.x86_64-latest.args | 8 +-
.../disk-shared.x86_64-latest.args | 14 +--
.../disk-slices.x86_64-latest.args | 14 +--
.../disk-snapshot.x86_64-latest.args | 10 +-
.../disk-source-pool-mode.x86_64-latest.args | 12 +--
.../disk-source-pool.x86_64-latest.args | 14 +--
.../disk-transient.x86_64-latest.args | 6 +-
...sk-usb-device-removable.x86_64-latest.args | 8 +-
.../disk-usb-device.x86_64-latest.args | 8 +-
.../disk-vhostuser.x86_64-latest.args | 8 +-
.../disk-virtio-queues.x86_64-latest.args | 8 +-
...irtio-scsi-reservations.x86_64-latest.args | 10 +-
.../disk-virtio.x86_64-latest.args | 10 +-
.../encrypted-disk-usage.x86_64-latest.args | 6 +-
.../encrypted-disk.x86_64-latest.args | 6 +-
.../eoi-disabled.x86_64-latest.args | 4 +-
.../eoi-enabled.x86_64-latest.args | 4 +-
.../event_idx.x86_64-latest.args | 12 +--
.../fips-enabled.x86_64-latest.args | 6 +-
.../floppy-drive-fat.x86_64-latest.args | 6 +-
.../qemuxml2argvdata/fs9p.x86_64-latest.args | 6 +-
.../genid-auto.x86_64-latest.args | 4 +-
.../qemuxml2argvdata/genid.x86_64-latest.args | 4 +-
...egl-headless-rendernode.x86_64-latest.args | 6 +-
.../graphics-egl-headless.x86_64-latest.args | 6 +-
...pice-gl-auto-rendernode.x86_64-latest.args | 6 +-
...ics-vnc-auto-socket-cfg.x86_64-latest.args | 6 +-
...raphics-vnc-auto-socket.x86_64-latest.args | 4 +-
...aphics-vnc-egl-headless.x86_64-latest.args | 6 +-
...hics-vnc-no-listen-attr.x86_64-latest.args | 6 +-
.../graphics-vnc-none.x86_64-latest.args | 4 +-
.../graphics-vnc-policy.x86_64-latest.args | 6 +-
.../graphics-vnc-power.x86_64-latest.args | 6 +-
...remove-generated-socket.x86_64-latest.args | 6 +-
.../graphics-vnc-sasl.x86_64-latest.args | 6 +-
...-vnc-socket-new-cmdline.x86_64-latest.args | 4 +-
.../graphics-vnc-socket.x86_64-latest.args | 4 +-
...graphics-vnc-tls-secret.x86_64-latest.args | 4 +-
.../graphics-vnc-tls.x86_64-latest.args | 4 +-
.../graphics-vnc-websocket.x86_64-latest.args | 4 +-
.../graphics-vnc.x86_64-latest.args | 6 +-
...tdev-mdev-display-ramfb.x86_64-latest.args | 6 +-
...play-spice-egl-headless.x86_64-latest.args | 6 +-
...ev-display-spice-opengl.x86_64-latest.args | 6 +-
...isplay-vnc-egl-headless.x86_64-latest.args | 6 +-
...ostdev-mdev-display-vnc.x86_64-latest.args | 6 +-
.../hostdev-scsi-lsi.x86_64-latest.args | 20 ++--
...ostdev-scsi-virtio-scsi.x86_64-latest.args | 22 ++---
.../hugepages-memaccess3.x86_64-latest.args | 2 +-
.../hugepages-nvdimm.x86_64-latest.args | 4 +-
.../hyperv-off.x86_64-latest.args | 4 +-
.../hyperv-panic.x86_64-latest.args | 2 +-
.../hyperv-stimer-direct.x86_64-latest.args | 2 +-
.../hyperv.x86_64-latest.args | 2 +-
.../input-linux.x86_64-latest.args | 4 +-
.../intel-iommu-aw-bits.x86_64-latest.args | 2 +-
...ntel-iommu-caching-mode.x86_64-latest.args | 2 +-
...ntel-iommu-device-iotlb.x86_64-latest.args | 2 +-
.../intel-iommu-eim.x86_64-latest.args | 2 +-
.../intel-iommu.x86_64-latest.args | 2 +-
...threads-virtio-scsi-pci.x86_64-latest.args | 10 +-
.../kvmclock+eoi-disabled.x86_64-latest.args | 4 +-
...luks-disks-source-qcow2.x86_64-latest.args | 16 +--
.../luks-disks-source.x86_64-latest.args | 14 +--
.../luks-disks.x86_64-latest.args | 8 +-
...memory-default-hugepage.x86_64-latest.args | 4 +-
.../memfd-memory-numa.x86_64-latest.args | 6 +-
...y-hotplug-nvdimm-access.x86_64-latest.args | 8 +-
...ry-hotplug-nvdimm-align.x86_64-latest.args | 8 +-
...ry-hotplug-nvdimm-label.x86_64-latest.args | 8 +-
...ory-hotplug-nvdimm-pmem.x86_64-latest.args | 8 +-
...hotplug-nvdimm-readonly.x86_64-latest.args | 8 +-
.../memory-hotplug-nvdimm.x86_64-latest.args | 8 +-
...mory-hotplug-virtio-mem.x86_64-latest.args | 10 +-
...ory-hotplug-virtio-pmem.x86_64-latest.args | 8 +-
.../misc-no-reboot.x86_64-latest.args | 4 +-
.../mlock-off.x86_64-latest.args | 2 +-
.../mlock-on.x86_64-latest.args | 2 +-
.../net-vdpa.x86_64-latest.args | 4 +-
.../net-vhostuser.x86_64-latest.args | 8 +-
.../numatune-hmat.x86_64-latest.args | 4 +-
...emnode-restrictive-mode.x86_64-latest.args | 4 +-
.../numatune-memnode.x86_64-latest.args | 4 +-
.../os-firmware-bios.x86_64-latest.args | 16 +--
...re-efi-no-enrolled-keys.x86_64-latest.args | 6 +-
...os-firmware-efi-secboot.x86_64-latest.args | 16 +--
.../os-firmware-efi.x86_64-latest.args | 16 +--
.../panic-double.x86_64-latest.args | 4 +-
.../panic-no-address.x86_64-latest.args | 8 +-
.../qemuxml2argvdata/panic.x86_64-latest.args | 8 +-
.../parallel-unix-chardev.x86_64-latest.args | 8 +-
...-hotplug-bridge-disable.x86_64-latest.args | 4 +-
...i-hotplug-bridge-enable.x86_64-latest.args | 4 +-
...pi-root-hotplug-disable.x86_64-latest.args | 4 +-
...cpi-root-hotplug-enable.x86_64-latest.args | 4 +-
...cie-root-port-nohotplug.x86_64-latest.args | 18 ++--
.../pv-spinlock-disabled.x86_64-latest.args | 4 +-
.../pv-spinlock-enabled.x86_64-latest.args | 4 +-
...-hotplug-bridge-disable.x86_64-latest.args | 10 +-
...i-hotplug-bridge-enable.x86_64-latest.args | 10 +-
.../qemu-ns.x86_64-latest.args | 6 +-
.../serial-unix-chardev.x86_64-latest.args | 8 +-
...rtcard-passthrough-unix.x86_64-latest.args | 8 +-
.../tpm-emulator-tpm2-enc.x86_64-latest.args | 6 +-
...pm-emulator-tpm2-pstate.x86_64-latest.args | 6 +-
.../tpm-emulator-tpm2.x86_64-latest.args | 6 +-
.../tpm-emulator.x86_64-latest.args | 6 +-
.../tpm-passthrough-crb.x86_64-latest.args | 6 +-
.../tpm-passthrough.x86_64-latest.args | 6 +-
.../tseg-explicit-size.x86_64-latest.args | 10 +-
.../usb-redir-unix.x86_64-latest.args | 14 +--
...vhost-user-fs-fd-memory.x86_64-latest.args | 2 +-
...vhost-user-fs-hugepages.x86_64-latest.args | 12 +--
...host-user-gpu-secondary.x86_64-latest.args | 10 +-
.../vhost-user-vga.x86_64-latest.args | 8 +-
.../vhost-vsock-auto.x86_64-latest.args | 6 +-
.../vhost-vsock.x86_64-latest.args | 6 +-
...eo-bochs-display-device.x86_64-latest.args | 8 +-
...video-qxl-device-vram64.x86_64-latest.args | 6 +-
...o-qxl-sec-device-vram64.x86_64-latest.args | 8 +-
...eo-ramfb-display-device.x86_64-latest.args | 8 +-
...video-virtio-vga-gpu-gl.x86_64-latest.args | 8 +-
.../virtio-9p-createmode.x86_64-latest.args | 14 +--
.../virtio-9p-multidevs.x86_64-latest.args | 12 +--
.../virtio-lun.x86_64-latest.args | 12 +--
...virtio-non-transitional.x86_64-latest.args | 42 ++++----
...-options-controller-ats.x86_64-latest.args | 12 +--
...ptions-controller-iommu.x86_64-latest.args | 12 +--
...tions-controller-packed.x86_64-latest.args | 12 +--
...virtio-options-disk-ats.x86_64-latest.args | 8 +-
...rtio-options-disk-iommu.x86_64-latest.args | 8 +-
...tio-options-disk-packed.x86_64-latest.args | 8 +-
.../virtio-options-fs-ats.x86_64-latest.args | 8 +-
...virtio-options-fs-iommu.x86_64-latest.args | 8 +-
...irtio-options-fs-packed.x86_64-latest.args | 8 +-
...irtio-options-input-ats.x86_64-latest.args | 8 +-
...tio-options-input-iommu.x86_64-latest.args | 8 +-
...io-options-input-packed.x86_64-latest.args | 8 +-
...-options-memballoon-ats.x86_64-latest.args | 4 +-
...loon-freepage-reporting.x86_64-latest.args | 4 +-
...ptions-memballoon-iommu.x86_64-latest.args | 4 +-
...tions-memballoon-packed.x86_64-latest.args | 4 +-
.../virtio-options-net-ats.x86_64-latest.args | 8 +-
...irtio-options-net-iommu.x86_64-latest.args | 8 +-
...rtio-options-net-packed.x86_64-latest.args | 8 +-
.../virtio-options-rng-ats.x86_64-latest.args | 8 +-
...irtio-options-rng-iommu.x86_64-latest.args | 8 +-
...rtio-options-rng-packed.x86_64-latest.args | 8 +-
...irtio-options-video-ats.x86_64-latest.args | 8 +-
...tio-options-video-iommu.x86_64-latest.args | 8 +-
...io-options-video-packed.x86_64-latest.args | 8 +-
.../virtio-options.x86_64-latest.args | 28 +++---
.../virtio-rng-builtin.x86_64-latest.args | 6 +-
.../virtio-rng-egd-unix.x86_64-latest.args | 6 +-
.../virtio-transitional.x86_64-latest.args | 26 ++---
.../watchdog-device.x86_64-latest.args | 8 +-
.../watchdog-dump.x86_64-latest.args | 8 +-
.../watchdog-injectnmi.x86_64-latest.args | 8 +-
.../watchdog.x86_64-latest.args | 6 +-
...-default-cpu-kvm-pc-4.2.x86_64-latest.args | 6 +-
...default-cpu-kvm-q35-4.2.x86_64-latest.args | 14 +--
...-default-cpu-tcg-pc-4.2.x86_64-latest.args | 6 +-
...default-cpu-tcg-q35-4.2.x86_64-latest.args | 14 +--
.../x86_64-pc-graphics.x86_64-latest.args | 20 ++--
.../x86_64-pc-headless.x86_64-latest.args | 16 +--
.../x86_64-q35-graphics.x86_64-latest.args | 34 +++----
.../x86_64-q35-headless.x86_64-latest.args | 30 +++---
tests/qemuxml2argvtest.c | 12 ++-
tests/testutilsqemuschema.c | 11 ++-
tests/testutilsqemuschema.h | 1 +
266 files changed, 1123 insertions(+), 1093 deletions(-)
--
2.31.1
3 years, 1 month
[PATCH] qemu: Decrease scope of variables in qemuConnectGetAllDomainStats()
by Michal Privoznik
There are two variables (@vm and @domflags) in qemuConnectGetAllDomainStats()
that are used only within the for() loop but declared for entire function.
Bring them into the loop to make it obvious they are not used outside of it.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_driver.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 9bcba4b9a4..b9cc8f8379 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -18811,14 +18811,12 @@ qemuConnectGetAllDomainStats(virConnectPtr conn,
virQEMUDriver *driver = conn->privateData;
virErrorPtr orig_err = NULL;
virDomainObj **vms = NULL;
- virDomainObj *vm;
size_t nvms;
virDomainStatsRecordPtr *tmpstats = NULL;
bool enforce = !!(flags & VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS);
int nstats = 0;
size_t i;
int ret = -1;
- unsigned int domflags = 0;
unsigned int lflags = flags & (VIR_CONNECT_LIST_DOMAINS_FILTERS_ACTIVE |
VIR_CONNECT_LIST_DOMAINS_FILTERS_PERSISTENT |
VIR_CONNECT_LIST_DOMAINS_FILTERS_STATE);
@@ -18848,12 +18846,11 @@ qemuConnectGetAllDomainStats(virConnectPtr conn,
tmpstats = g_new0(virDomainStatsRecordPtr, nvms + 1);
for (i = 0; i < nvms; i++) {
+ virDomainObj *vm = vms[i];
virDomainStatsRecordPtr tmp = NULL;
unsigned int privflags = 0;
unsigned int requestedStats = stats;
-
- domflags = 0;
- vm = vms[i];
+ unsigned int domflags = 0;
virObjectLock(vm);
--
2.32.0
3 years, 1 month
[PATCH 0/2] objecteventtest: Two simple improvements
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (2):
objecteventtest: Drop lifecycleEventCounter_reset()
objecteventtest: Don't overwrite @ret on failure
tests/objecteventtest.c | 129 +++++++++++-----------------------------
1 file changed, 36 insertions(+), 93 deletions(-)
--
2.32.0
3 years, 1 month
[PATCH] virNodeDeviceDefParse: Don't call post-parse callbacks with NULL def
by Peter Krempa
When parsing of the node device XML we'd still call the post-parse and
validation callbacks which makes no sense. Additionally the callbacks
were expecting a non-NULL pointer which leads to a crash.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2014139
Fixes: d5ae634ba28
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/node_device_conf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index 9bbff97ffd..d5e02f623d 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -2178,8 +2178,9 @@ virNodeDeviceDefParse(const char *str,
g_autoptr(virNodeDeviceDef) def = NULL;
if ((xml = virXMLParse(filename, str, _("(node_device_definition)"), NULL, false))) {
- def = virNodeDeviceDefParseNode(xml, xmlDocGetRootElement(xml),
- create, virt_type);
+ if (!(def = virNodeDeviceDefParseNode(xml, xmlDocGetRootElement(xml),
+ create, virt_type)))
+ return NULL;
}
if (parserCallbacks) {
--
2.31.1
3 years, 1 month
[PATCH 0/4] Fix the bug about virsh domstats on qemu <5.2.0
by Hiroki Narukawa
query-dirty-rate command is used for virsh domstats regardless of qemu version, but this is available only on qemu >=5.2.0.
So virsh domstats fails if qemu is older.
This patchset fixes the bug.
I added it to NEWS because I thought it is a bug that users want to find, but if it is not so please simply ignore the last commit.
Hiroki Narukawa (4):
qemu_capabilities: Add QEMU_CAPS_QUERY_DIRTY_RATE capability
qemu_driver: add required capabilities to qemuDomainGetStatsWorkers
qemu_driver: add check for qemu capabilities requirements
NEWS: document bug fix about virsh domstats on qemu < 5.2.0
NEWS.rst | 5 ++
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_driver.c | 72 +++++++++++++------
.../caps_5.2.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 +
.../caps_5.2.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 +
.../caps_5.2.0.x86_64.xml | 1 +
.../caps_6.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 +
.../caps_6.0.0.x86_64.xml | 1 +
.../caps_6.1.0.x86_64.xml | 1 +
.../caps_6.2.0.x86_64.xml | 1 +
14 files changed, 68 insertions(+), 22 deletions(-)
--
2.17.1
3 years, 1 month
Add a couple of negative unit tests
by Ani Sinha
This patch series adds a couple of negative unit tests in order to make sure
we fail in case of invalid conf options.
* [PATCH 1/2] conf/test: add a negative unit test for invalid pci
Above patch makes sure we fail if invalid pci specific global feature is specified.
* [PATCH 2/2] conf/test: add a negative test for invalid
Above patch makes sure we fail if invalid config arrtinute for acpi-bridge-hotplug is
specified.
3 years, 1 month
[PATCH 0/2] qemu: Move 2 pid files to stateDir
by Peng Liang
Please see the commit messages for detail.
Peng Liang (2):
qemu: Move pid file of pr-helper to stateDir
qemu: Move pid file of virtiofsd to stateDir
src/qemu/qemu_process.c | 6 ++++--
src/qemu/qemu_virtiofs.c | 8 ++++----
2 files changed, 8 insertions(+), 6 deletions(-)
--
2.31.1
3 years, 1 month
[PATCH] qemu: Do not report eof when processing monitor IO
by Jim Fehlig
There have been countless reports from users concerned about the following
error reported by libvirtd when qemu domains are shutdown
internal error: End of file from qemu monitor
While the error is harmless, users often mistaken it for real problem with
their deployments. EOF from the monitor can't be entirely ignored since
other threads may be using the monitor and must be able to detect the EOF
condition.
One potential fix is to delay reporting EOF until the monitor is used
after EOF is detected. This patch adds a 'goteof' member to the
qemuMonitor structure, which is set when EOF is detected on the monitor
socket. If another thread later tries to send data on the monitor, the
EOF error is reported.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
First non-RFC version of the patch. RFC version can be found here
https://listman.redhat.com/archives/libvir-list/2021-October/msg00484.html
Tests mentioned in the below post are running on this version of the
patch and have completed 12 iterations thus far
https://listman.redhat.com/archives/libvir-list/2021-October/msg00351.html
src/qemu/qemu_monitor.c | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 7ff6a1161f..434cc26c10 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -113,6 +113,7 @@ struct _qemuMonitor {
/* true if qemu no longer wants 'props' sub-object of object-add */
bool objectAddNoWrap;
+ bool goteof;
};
/**
@@ -526,7 +527,6 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
{
qemuMonitor *mon = opaque;
bool error = false;
- bool eof = false;
bool hangup = false;
virObjectRef(mon);
@@ -544,7 +544,7 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
if (mon->lastError.code != VIR_ERR_OK) {
if (cond & (G_IO_HUP | G_IO_ERR))
- eof = true;
+ mon->goteof = true;
error = true;
} else {
if (cond & G_IO_OUT) {
@@ -562,7 +562,7 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
if (errno == ECONNRESET)
hangup = true;
} else if (got == 0) {
- eof = true;
+ mon->goteof = true;
} else {
/* Ignore hangup/error cond if we read some data, to
* give time for that data to be consumed */
@@ -575,22 +575,19 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
if (cond & G_IO_HUP) {
hangup = true;
- if (!error) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("End of file from qemu monitor"));
- eof = true;
- }
+ if (!error)
+ mon->goteof = true;
}
- if (!error && !eof &&
+ if (!error && !mon->goteof &&
cond & G_IO_ERR) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Invalid file descriptor while waiting for monitor"));
- eof = true;
+ mon->goteof = true;
}
}
- if (error || eof) {
+ if (error || mon->goteof) {
if (hangup && mon->logFunc != NULL) {
/* Check if an error message from qemu is available and if so, use
* it to overwrite the actual message. It's done only in early
@@ -609,7 +606,7 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
/* Already have an error, so clear any new error */
virResetLastError();
} else {
- if (virGetLastErrorCode() == VIR_ERR_OK)
+ if (virGetLastErrorCode() == VIR_ERR_OK && !mon->goteof)
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Error while processing monitor IO"));
virCopyLastError(&mon->lastError);
@@ -630,7 +627,7 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
/* We have to unlock to avoid deadlock against command thread,
* but is this safe ? I think it is, because the callback
* will try to acquire the virDomainObj *mutex next */
- if (eof) {
+ if (mon->goteof) {
qemuMonitorEofNotifyCallback eofNotify = mon->cb->eofNotify;
virDomainObj *vm = mon->vm;
@@ -949,6 +946,11 @@ qemuMonitorSend(qemuMonitor *mon,
virSetError(&mon->lastError);
return -1;
}
+ if (mon->goteof) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("End of file from qemu monitor"));
+ return -1;
+ }
mon->msg = msg;
qemuMonitorUpdateWatch(mon);
--
2.33.0
3 years, 1 month
[PATCH 0/2] virnetsocket: Use g_auto* more
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (2):
virnetsocket: Don't free virCommand in virNetSocketNewConnectCommand()
virnetsocket: Use g_auto* more
src/rpc/virnetsocket.c | 64 +++++++++++++++---------------------------
1 file changed, 22 insertions(+), 42 deletions(-)
--
2.32.0
3 years, 1 month
[PATCH 0/1] Fix the bug on disk->queue_size capability validation
by Hiroki Narukawa
Sorry, the patch I send in September 2021 had a mistake on capability check.
This patch fixes that.
Hiroki Narukawa (1):
qemu_validate: Fix capability check for disk queue_size
src/qemu/qemu_validate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.17.1
3 years, 1 month