[libvirt] [PATCH 0/4] implement cgroups v2 cpuset controller support
by Pavel Hrdina
Pavel Hrdina (4):
util: implement virCgroupV2(Set|Get)CpusetMems
util: implement virCgroupV2(Set|Get)CpusetMemoryMigrate
util: implement virCgroupV2(Set|Get)CpusetCpus
util: enable cgroups v2 cpuset controller for threads
src/util/vircgroupv2.c | 74 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
--
2.20.1
5 years, 7 months
[libvirt] [PATCH] tests: use VIR_AUTOUNREF in storagepoolcapstest
by Pavel Hrdina
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
tests/storagepoolcapstest.c | 31 +++++++++++--------------------
1 file changed, 11 insertions(+), 20 deletions(-)
diff --git a/tests/storagepoolcapstest.c b/tests/storagepoolcapstest.c
index f8b560c2f0..518a5fdfe7 100644
--- a/tests/storagepoolcapstest.c
+++ b/tests/storagepoolcapstest.c
@@ -54,30 +54,26 @@ test_virStoragePoolCapsFormat(const void *opaque)
struct test_virStoragePoolCapsFormatData *data =
(struct test_virStoragePoolCapsFormatData *) opaque;
virCapsPtr driverCaps = data->driverCaps;
- virStoragePoolCapsPtr poolCaps = NULL;
- int ret = -1;
+ VIR_AUTOUNREF(virStoragePoolCapsPtr) poolCaps = NULL;
VIR_AUTOFREE(char *) path = NULL;
VIR_AUTOFREE(char *) poolCapsXML = NULL;
if (!(poolCaps = virStoragePoolCapsNew(driverCaps)))
- goto cleanup;
+ return -1;
if (virAsprintf(&path, "%s/storagepoolcapsschemadata/poolcaps-%s.xml",
- abs_srcdir, data->filename) < 0)
- goto cleanup;
+ abs_srcdir, data->filename) < 0) {
+ return -1;
+ }
if (!(poolCapsXML = virStoragePoolCapsFormat(poolCaps)))
- goto cleanup;
+ return -1;
if (virTestCompareToFile(poolCapsXML, path) < 0)
- goto cleanup;
+ return -1;
- ret = 0;
-
- cleanup:
- virObjectUnref(poolCaps);
- return ret;
+ return 0;
}
@@ -85,8 +81,8 @@ static int
mymain(void)
{
int ret = 0;
- virCapsPtr fullCaps = NULL;
- virCapsPtr fsCaps = NULL;
+ VIR_AUTOUNREF(virCapsPtr) fullCaps = NULL;
+ VIR_AUTOUNREF(virCapsPtr) fsCaps = NULL;
#define DO_TEST(Filename, DriverCaps) \
do { \
@@ -98,8 +94,7 @@ mymain(void)
if (!(fullCaps = virCapabilitiesNew(VIR_ARCH_NONE, false, false)) ||
!(fsCaps = virCapabilitiesNew(VIR_ARCH_NONE, false, false))) {
- ret = -1;
- goto cleanup;
+ return -1;
}
test_virCapabilitiesAddFullStoragePool(fullCaps);
@@ -108,10 +103,6 @@ mymain(void)
DO_TEST("full", fullCaps);
DO_TEST("fs", fsCaps);
- cleanup:
- virObjectUnref(fullCaps);
- virObjectUnref(fsCaps);
-
return ret;
}
--
2.20.1
5 years, 7 months
[libvirt] [PATCH 0/3] Define XDG variables for hypervisor domains
by Erik Skultety
So, according to this report [1], Mesa enabled on-disk cache for its shaders
which it tries to create either under XDG_CACHE_HOME/mesa_shader_cache or under
HOME/.cache/mesa_shader_cache. Since libvirt doesn't set XDGs and HOME is only
passed iff the QEMU process isn't run with SUID, Mesa will default to the home
directory specified in /etc/passwd.
Because of this, Mesa will fail to create the cache and QEMU refuses to start
the VM (interestingly enough, Intel reports the problem too, but Mesa disables
the cache and the VM starts). This series proposes usage of XDG variables to
fix the problem by pointing XDG variables to hypervisor specific directory
under libvirt's libDir. Additionally, HOME is also enforced for all VM
processes and points to the base hypervisor libDir directory.
To illustrate this further:
system qemu:
HOME=/var/lib/libvirt/qemu/domain-5-f-live \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-5-f-live/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-5-f-live/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-5-f-live/.config \
session qemu:
HOME=/home/eskultet/.config/libvirt/qemu/lib/domain-4-f-live \
XDG_DATA_HOME=/home/eskultet/.config/libvirt/qemu/lib/domain-4-f-live/.local/share \
XDG_CACHE_HOME=/home/eskultet/.config/libvirt/qemu/lib/domain-4-f-live/.cache \
XDG_CONFIG_HOME=/home/eskultet/.config/libvirt/qemu/lib/domain-4-f-live/.config \
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1659484
Erik Skultety (3):
qemu: command: Introduce virCommandAddEnvXDG helper
qemu: Introduce qemuCommandEnvSetup helper
qemu: command: Override HOME variable for QEMU processes
src/libvirt_private.syms | 1 +
src/qemu/qemu_command.c | 26 ++++++++++++++++++-
src/qemu/qemu_command.h | 3 +++
src/util/vircommand.c | 21 +++++++++++++++
src/util/vircommand.h | 2 ++
.../aarch64-aavmf-virtio-mmio.args | 5 +++-
tests/qemuxml2argvdata/aarch64-acpi-uefi.args | 5 +++-
.../aarch64-cpu-passthrough.args | 5 +++-
tests/qemuxml2argvdata/aarch64-gic-host.args | 5 +++-
.../aarch64-gic-none-tcg.args | 5 +++-
tests/qemuxml2argvdata/aarch64-gic-v2.args | 5 +++-
tests/qemuxml2argvdata/aarch64-gic-v3.args | 5 +++-
.../aarch64-kvm-32-on-64.args | 5 +++-
.../aarch64-noacpi-nouefi.args | 5 +++-
.../qemuxml2argvdata/aarch64-noacpi-uefi.args | 5 +++-
.../qemuxml2argvdata/aarch64-pci-serial.args | 5 +++-
.../aarch64-traditional-pci.args | 5 +++-
.../aarch64-usb-controller-nec-xhci.args | 5 +++-
.../aarch64-usb-controller-qemu-xhci.args | 5 +++-
.../aarch64-video-default.args | 5 +++-
.../aarch64-video-virtio-gpu-pci.args | 5 +++-
.../aarch64-virt-2.6-virtio-pci-default.args | 5 +++-
.../aarch64-virt-default-nic.args | 5 +++-
.../aarch64-virt-headless.aarch64-latest.args | 5 +++-
.../qemuxml2argvdata/aarch64-virt-virtio.args | 5 +++-
.../aarch64-virtio-pci-default.args | 5 +++-
.../aarch64-virtio-pci-manual-addresses.args | 5 +++-
tests/qemuxml2argvdata/acpi-table.args | 5 +++-
.../arm-vexpressa9-basic.args | 5 +++-
.../arm-vexpressa9-nodevs.args | 5 +++-
.../arm-vexpressa9-virtio.args | 5 +++-
tests/qemuxml2argvdata/arm-virt-virtio.args | 5 +++-
tests/qemuxml2argvdata/autoindex.args | 5 +++-
.../qemuxml2argvdata/balloon-ccw-deflate.args | 5 +++-
.../qemuxml2argvdata/balloon-device-auto.args | 5 +++-
.../balloon-device-deflate-off.args | 5 +++-
.../balloon-device-deflate.args | 5 +++-
.../balloon-device-period.args | 5 +++-
tests/qemuxml2argvdata/balloon-device.args | 5 +++-
.../balloon-mmio-deflate.args | 5 +++-
tests/qemuxml2argvdata/bios-nvram-secure.args | 5 +++-
tests/qemuxml2argvdata/bios-nvram.args | 5 +++-
tests/qemuxml2argvdata/bios.args | 5 +++-
.../blkdeviotune-group-num.args | 5 +++-
.../blkdeviotune-max-length.args | 5 +++-
tests/qemuxml2argvdata/blkdeviotune-max.args | 5 +++-
tests/qemuxml2argvdata/blkiotune-device.args | 5 +++-
tests/qemuxml2argvdata/blkiotune.args | 5 +++-
tests/qemuxml2argvdata/boot-cdrom.args | 5 +++-
tests/qemuxml2argvdata/boot-complex.args | 5 +++-
tests/qemuxml2argvdata/boot-floppy-q35.args | 5 +++-
tests/qemuxml2argvdata/boot-floppy.args | 5 +++-
.../boot-menu-disable-drive.args | 5 +++-
tests/qemuxml2argvdata/boot-menu-disable.args | 5 +++-
.../boot-menu-enable-with-timeout.args | 5 +++-
tests/qemuxml2argvdata/boot-menu-enable.args | 5 +++-
tests/qemuxml2argvdata/boot-multi.args | 5 +++-
tests/qemuxml2argvdata/boot-network.args | 5 +++-
tests/qemuxml2argvdata/boot-order.args | 5 +++-
tests/qemuxml2argvdata/boot-strict.args | 5 +++-
tests/qemuxml2argvdata/channel-guestfwd.args | 5 +++-
tests/qemuxml2argvdata/channel-spicevmc.args | 5 +++-
.../channel-unix-guestfwd.x86_64-2.5.0.args | 5 +++-
.../channel-unix-guestfwd.x86_64-latest.args | 5 +++-
.../qemuxml2argvdata/channel-virtio-auto.args | 5 +++-
.../channel-virtio-autoadd.args | 5 +++-
.../channel-virtio-autoassign.args | 5 +++-
.../channel-virtio-default.args | 5 +++-
.../channel-virtio-state.args | 5 +++-
.../qemuxml2argvdata/channel-virtio-unix.args | 5 +++-
tests/qemuxml2argvdata/channel-virtio.args | 5 +++-
tests/qemuxml2argvdata/chardev-reconnect.args | 5 +++-
tests/qemuxml2argvdata/clock-catchup.args | 5 +++-
tests/qemuxml2argvdata/clock-france.args | 5 +++-
tests/qemuxml2argvdata/clock-hpet-off.args | 5 +++-
.../clock-localtime-basis-localtime.args | 5 +++-
tests/qemuxml2argvdata/clock-localtime.args | 5 +++-
.../clock-timer-hyperv-rtc.args | 5 +++-
tests/qemuxml2argvdata/clock-utc.args | 5 +++-
tests/qemuxml2argvdata/clock-variable.args | 5 +++-
.../qemuxml2argvdata/console-compat-auto.args | 5 +++-
.../console-compat-chardev.args | 5 +++-
tests/qemuxml2argvdata/console-compat.args | 5 +++-
tests/qemuxml2argvdata/console-sclp.args | 5 +++-
.../qemuxml2argvdata/console-virtio-ccw.args | 5 +++-
.../qemuxml2argvdata/console-virtio-many.args | 5 +++-
.../qemuxml2argvdata/console-virtio-s390.args | 5 +++-
.../console-virtio-unix.x86_64-2.5.0.args | 5 +++-
.../console-virtio-unix.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/console-virtio.args | 5 +++-
tests/qemuxml2argvdata/controller-order.args | 5 +++-
.../controller-virtio-scsi.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/cpu-Haswell-noTSX.args | 5 +++-
tests/qemuxml2argvdata/cpu-Haswell.args | 5 +++-
tests/qemuxml2argvdata/cpu-Haswell2.args | 5 +++-
tests/qemuxml2argvdata/cpu-Haswell3.args | 5 +++-
tests/qemuxml2argvdata/cpu-cache-disable.args | 5 +++-
.../qemuxml2argvdata/cpu-cache-disable2.args | 5 +++-
.../qemuxml2argvdata/cpu-cache-disable3.args | 5 +++-
.../cpu-cache-emulate-l3.args | 5 +++-
.../cpu-cache-passthrough.args | 5 +++-
.../cpu-cache-passthrough2.args | 5 +++-
.../cpu-check-default-none.args | 5 +++-
.../cpu-check-default-none2.args | 5 +++-
.../cpu-check-default-partial.args | 5 +++-
.../cpu-check-default-partial2.args | 5 +++-
tests/qemuxml2argvdata/cpu-check-none.args | 5 +++-
tests/qemuxml2argvdata/cpu-eoi-disabled.args | 5 +++-
tests/qemuxml2argvdata/cpu-eoi-enabled.args | 5 +++-
tests/qemuxml2argvdata/cpu-exact1.args | 5 +++-
.../cpu-exact2-nofallback.args | 5 +++-
tests/qemuxml2argvdata/cpu-exact2.args | 5 +++-
tests/qemuxml2argvdata/cpu-fallback.args | 5 +++-
tests/qemuxml2argvdata/cpu-host-kvmclock.args | 5 +++-
.../qemuxml2argvdata/cpu-host-model-cmt.args | 5 +++-
.../cpu-host-model-fallback.args | 5 +++-
.../cpu-host-model-vendor.args | 5 +++-
tests/qemuxml2argvdata/cpu-host-model.args | 5 +++-
.../cpu-host-passthrough-features.args | 5 +++-
.../cpu-host-passthrough.args | 5 +++-
.../qemuxml2argvdata/cpu-hotplug-startup.args | 5 +++-
tests/qemuxml2argvdata/cpu-kvmclock.args | 5 +++-
tests/qemuxml2argvdata/cpu-minimum1.args | 5 +++-
tests/qemuxml2argvdata/cpu-minimum2.args | 5 +++-
tests/qemuxml2argvdata/cpu-numa-disjoint.args | 5 +++-
.../qemuxml2argvdata/cpu-numa-memshared.args | 5 +++-
.../cpu-numa-no-memory-element.args | 5 +++-
tests/qemuxml2argvdata/cpu-numa1.args | 5 +++-
tests/qemuxml2argvdata/cpu-numa2.args | 5 +++-
tests/qemuxml2argvdata/cpu-s390-features.args | 5 +++-
tests/qemuxml2argvdata/cpu-s390-zEC12.args | 5 +++-
tests/qemuxml2argvdata/cpu-strict1.args | 5 +++-
tests/qemuxml2argvdata/cpu-topology1.args | 5 +++-
tests/qemuxml2argvdata/cpu-topology2.args | 5 +++-
tests/qemuxml2argvdata/cpu-topology3.args | 5 +++-
tests/qemuxml2argvdata/cpu-tsc-frequency.args | 5 +++-
tests/qemuxml2argvdata/cputune-numatune.args | 5 +++-
.../qemuxml2argvdata/cputune-zero-shares.args | 5 +++-
tests/qemuxml2argvdata/cputune.args | 5 +++-
tests/qemuxml2argvdata/debug-threads.args | 5 +++-
.../default-kvm-host-arch.args | 5 +++-
.../default-qemu-host-arch.args | 5 +++-
tests/qemuxml2argvdata/disk-aio.args | 5 +++-
.../disk-aio.x86_64-2.12.0.args | 5 +++-
.../disk-aio.x86_64-latest.args | 5 +++-
...-backing-chains-noindex.x86_64-2.12.0.args | 5 +++-
...-backing-chains-noindex.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/disk-blockio.args | 5 +++-
tests/qemuxml2argvdata/disk-boot-cdrom.args | 5 +++-
tests/qemuxml2argvdata/disk-boot-disk.args | 5 +++-
.../disk-cache.x86_64-1.5.3.args | 5 +++-
.../disk-cache.x86_64-2.12.0.args | 5 +++-
.../disk-cache.x86_64-2.6.0.args | 5 +++-
.../disk-cache.x86_64-2.7.0.args | 5 +++-
.../disk-cache.x86_64-latest.args | 5 +++-
.../disk-cdrom-bus-other.x86_64-latest.args | 5 +++-
.../qemuxml2argvdata/disk-cdrom-network.args | 5 +++-
.../disk-cdrom-network.x86_64-2.12.0.args | 5 +++-
.../disk-cdrom-network.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/disk-cdrom-tray.args | 5 +++-
.../disk-cdrom-tray.x86_64-2.12.0.args | 5 +++-
.../disk-cdrom-tray.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/disk-cdrom.args | 5 +++-
.../disk-cdrom.x86_64-2.12.0.args | 5 +++-
.../disk-cdrom.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/disk-copy_on_read.args | 5 +++-
.../disk-copy_on_read.x86_64-2.12.0.args | 5 +++-
.../disk-copy_on_read.x86_64-latest.args | 5 +++-
.../qemuxml2argvdata/disk-detect-zeroes.args | 5 +++-
.../disk-detect-zeroes.x86_64-2.12.0.args | 5 +++-
.../disk-detect-zeroes.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/disk-discard.args | 5 +++-
tests/qemuxml2argvdata/disk-error-policy.args | 5 +++-
.../disk-error-policy.x86_64-2.12.0.args | 5 +++-
.../disk-error-policy.x86_64-latest.args | 5 +++-
.../disk-floppy-q35-2_11.x86_64-2.12.0.args | 5 +++-
.../disk-floppy-q35-2_11.x86_64-latest.args | 5 +++-
.../disk-floppy-q35-2_9.x86_64-2.12.0.args | 5 +++-
.../disk-floppy-q35-2_9.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/disk-floppy-tray.args | 5 +++-
tests/qemuxml2argvdata/disk-floppy.args | 5 +++-
.../disk-floppy.x86_64-2.12.0.args | 5 +++-
.../disk-floppy.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/disk-fmt-qcow.args | 5 +++-
tests/qemuxml2argvdata/disk-geometry.args | 5 +++-
...sk-hostdev-scsi-virtio-iscsi-auth-AES.args | 5 +++-
tests/qemuxml2argvdata/disk-ide-split.args | 5 +++-
tests/qemuxml2argvdata/disk-ide-wwn.args | 5 +++-
tests/qemuxml2argvdata/disk-ioeventfd.args | 5 +++-
tests/qemuxml2argvdata/disk-iscsi.args | 5 +++-
.../disk-network-gluster.args | 5 +++-
.../disk-network-gluster.x86_64-2.12.0.args | 5 +++-
.../disk-network-gluster.x86_64-latest.args | 5 +++-
.../disk-network-iscsi-modern.args | 5 +++-
.../qemuxml2argvdata/disk-network-iscsi.args | 5 +++-
.../disk-network-iscsi.x86_64-2.12.0.args | 5 +++-
.../disk-network-iscsi.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/disk-network-nbd.args | 5 +++-
.../disk-network-nbd.x86_64-2.12.0.args | 5 +++-
.../disk-network-nbd.x86_64-latest.args | 5 +++-
.../disk-network-rbd.x86_64-2.12.0.args | 5 +++-
.../disk-network-rbd.x86_64-2.5.0.args | 5 +++-
.../disk-network-rbd.x86_64-latest.args | 5 +++-
.../disk-network-sheepdog.args | 5 +++-
.../disk-network-sheepdog.x86_64-2.12.0.args | 5 +++-
.../disk-network-sheepdog.x86_64-latest.args | 5 +++-
.../disk-network-source-auth.args | 5 +++-
...isk-network-source-auth.x86_64-2.12.0.args | 5 +++-
...isk-network-source-auth.x86_64-latest.args | 5 +++-
.../disk-network-tlsx509.args | 5 +++-
.../disk-network-tlsx509.x86_64-2.12.0.args | 5 +++-
.../disk-network-tlsx509.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/disk-network-vxhs.args | 5 +++-
tests/qemuxml2argvdata/disk-no-boot.args | 5 +++-
tests/qemuxml2argvdata/disk-order.args | 5 +++-
.../qemuxml2argvdata/disk-readonly-disk.args | 5 +++-
.../disk-readonly-disk.x86_64-2.12.0.args | 5 +++-
.../disk-readonly-disk.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/disk-sata-device.args | 5 +++-
.../disk-scsi-device-auto.x86_64-1.5.3.args | 5 +++-
.../disk-scsi-device-auto.x86_64-latest.args | 5 +++-
.../disk-scsi-disk-split.args | 5 +++-
.../qemuxml2argvdata/disk-scsi-disk-vpd.args | 5 +++-
.../qemuxml2argvdata/disk-scsi-disk-wwn.args | 5 +++-
.../disk-scsi-lun-passthrough.args | 5 +++-
.../disk-scsi.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/disk-serial.args | 5 +++-
.../disk-shared.x86_64-2.12.0.args | 5 +++-
.../disk-shared.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/disk-snapshot.args | 5 +++-
.../disk-source-pool-mode.args | 5 +++-
tests/qemuxml2argvdata/disk-source-pool.args | 5 +++-
.../disk-usb-device-removable.args | 5 +++-
tests/qemuxml2argvdata/disk-usb-device.args | 5 +++-
.../disk-virtio-ccw-many.args | 5 +++-
tests/qemuxml2argvdata/disk-virtio-ccw.args | 5 +++-
.../qemuxml2argvdata/disk-virtio-queues.args | 5 +++-
.../disk-virtio-s390-zpci.args | 5 +++-
tests/qemuxml2argvdata/disk-virtio-s390.args | 5 +++-
...irtio-scsi-reservations.x86_64-2.12.0.args | 5 +++-
...irtio-scsi-reservations.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/disk-virtio.args | 5 +++-
.../encrypted-disk-usage.args | 5 +++-
tests/qemuxml2argvdata/encrypted-disk.args | 5 +++-
tests/qemuxml2argvdata/eoi-disabled.args | 5 +++-
tests/qemuxml2argvdata/eoi-enabled.args | 5 +++-
tests/qemuxml2argvdata/event_idx.args | 5 +++-
.../fd-memory-no-numa-topology.args | 5 +++-
.../fd-memory-numa-topology.args | 5 +++-
.../fd-memory-numa-topology2.args | 5 +++-
.../fd-memory-numa-topology3.args | 5 +++-
tests/qemuxml2argvdata/fips-enabled.args | 5 +++-
tests/qemuxml2argvdata/floppy-drive-fat.args | 5 +++-
.../floppy-drive-fat.x86_64-2.12.0.args | 5 +++-
.../floppy-drive-fat.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/fs9p-ccw.args | 5 +++-
tests/qemuxml2argvdata/fs9p.args | 5 +++-
.../genid-auto.x86_64-latest.args | 5 +++-
.../qemuxml2argvdata/genid.x86_64-latest.args | 5 +++-
...egl-headless-rendernode.x86_64-latest.args | 5 +++-
.../graphics-egl-headless.args | 5 +++-
.../graphics-egl-headless.x86_64-latest.args | 5 +++-
.../graphics-sdl-fullscreen.args | 5 +++-
tests/qemuxml2argvdata/graphics-sdl.args | 5 +++-
.../graphics-spice-agent-file-xfer.args | 5 +++-
.../graphics-spice-agentmouse.args | 5 +++-
.../graphics-spice-auto-socket-cfg.args | 5 +++-
.../graphics-spice-auto-socket.args | 5 +++-
.../graphics-spice-compression.args | 5 +++-
.../graphics-spice-egl-headless.args | 5 +++-
...pice-gl-auto-rendernode.x86_64-latest.args | 5 +++-
.../graphics-spice-no-args.args | 5 +++-
.../graphics-spice-qxl-vga.args | 5 +++-
.../qemuxml2argvdata/graphics-spice-sasl.args | 5 +++-
.../graphics-spice-socket.args | 5 +++-
.../graphics-spice-timeout.args | 5 +++-
.../graphics-spice-usb-redir.args | 5 +++-
tests/qemuxml2argvdata/graphics-spice.args | 5 +++-
.../graphics-vnc-auto-socket-cfg.args | 5 +++-
.../graphics-vnc-auto-socket.args | 5 +++-
.../graphics-vnc-egl-headless.args | 5 +++-
.../graphics-vnc-no-listen-attr.args | 5 +++-
tests/qemuxml2argvdata/graphics-vnc-none.args | 5 +++-
.../qemuxml2argvdata/graphics-vnc-policy.args | 5 +++-
.../graphics-vnc-remove-generated-socket.args | 5 +++-
tests/qemuxml2argvdata/graphics-vnc-sasl.args | 5 +++-
.../graphics-vnc-socket-new-cmdline.args | 5 +++-
.../qemuxml2argvdata/graphics-vnc-socket.args | 5 +++-
...graphics-vnc-tls-secret.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/graphics-vnc-tls.args | 5 +++-
.../graphics-vnc-tls.x86_64-2.4.0.args | 5 +++-
.../graphics-vnc-tls.x86_64-latest.args | 5 +++-
.../graphics-vnc-websocket.args | 5 +++-
tests/qemuxml2argvdata/graphics-vnc.args | 5 +++-
...play-spice-egl-headless.x86_64-latest.args | 5 +++-
...ev-display-spice-opengl.x86_64-latest.args | 5 +++-
...isplay-vnc-egl-headless.x86_64-latest.args | 5 +++-
...ostdev-mdev-display-vnc.x86_64-latest.args | 5 +++-
.../hostdev-mdev-precreated.args | 5 +++-
.../hostdev-pci-address-device.args | 5 +++-
.../qemuxml2argvdata/hostdev-pci-address.args | 5 +++-
.../hostdev-scsi-lsi-iscsi-auth.args | 5 +++-
.../hostdev-scsi-lsi-iscsi.args | 5 +++-
tests/qemuxml2argvdata/hostdev-scsi-lsi.args | 5 +++-
.../hostdev-scsi-readonly.args | 5 +++-
.../hostdev-scsi-vhost-scsi-ccw.args | 5 +++-
.../hostdev-scsi-vhost-scsi-pci.args | 5 +++-
.../hostdev-scsi-vhost-scsi-pcie.args | 5 +++-
.../hostdev-scsi-virtio-iscsi-auth.args | 5 +++-
.../hostdev-scsi-virtio-iscsi.args | 5 +++-
.../hostdev-scsi-virtio-scsi.args | 5 +++-
.../hostdev-subsys-mdev-vfio-ccw.args | 5 +++-
.../hostdev-usb-address-device-boot.args | 5 +++-
.../hostdev-usb-address-device.args | 5 +++-
.../qemuxml2argvdata/hostdev-usb-address.args | 5 +++-
.../hostdev-vfio-multidomain.args | 5 +++-
.../hostdev-vfio-zpci-autogenerate.args | 5 +++-
.../hostdev-vfio-zpci-boundaries.args | 5 +++-
.../hostdev-vfio-zpci-multidomain-many.args | 5 +++-
tests/qemuxml2argvdata/hostdev-vfio-zpci.args | 5 +++-
tests/qemuxml2argvdata/hostdev-vfio.args | 5 +++-
tests/qemuxml2argvdata/hotplug-base.args | 5 +++-
.../hugepages-default-2M.args | 5 +++-
.../hugepages-default-system-size.args | 5 +++-
tests/qemuxml2argvdata/hugepages-default.args | 5 +++-
.../qemuxml2argvdata/hugepages-memaccess.args | 5 +++-
.../hugepages-memaccess2.args | 5 +++-
tests/qemuxml2argvdata/hugepages-nodeset.args | 5 +++-
.../hugepages-numa-default-2M.args | 5 +++-
.../hugepages-numa-default-dimm.args | 5 +++-
.../hugepages-numa-default.args | 5 +++-
.../hugepages-numa-nodeset-part.args | 5 +++-
.../hugepages-numa-nodeset.args | 5 +++-
.../hugepages-nvdimm.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/hugepages-shared.args | 5 +++-
tests/qemuxml2argvdata/hyperv-off.args | 5 +++-
tests/qemuxml2argvdata/hyperv-panic.args | 5 +++-
tests/qemuxml2argvdata/hyperv.args | 5 +++-
.../qemuxml2argvdata/input-usbmouse-addr.args | 5 +++-
tests/qemuxml2argvdata/input-usbmouse.args | 5 +++-
tests/qemuxml2argvdata/input-usbtablet.args | 5 +++-
tests/qemuxml2argvdata/input-virtio-ccw.args | 5 +++-
.../intel-iommu-caching-mode.args | 5 +++-
.../intel-iommu-device-iotlb.args | 5 +++-
tests/qemuxml2argvdata/intel-iommu-eim.args | 5 +++-
.../qemuxml2argvdata/intel-iommu-machine.args | 5 +++-
tests/qemuxml2argvdata/intel-iommu.args | 5 +++-
.../iothreads-disk-virtio-ccw.args | 5 +++-
tests/qemuxml2argvdata/iothreads-disk.args | 5 +++-
.../iothreads-ids-partial.args | 5 +++-
tests/qemuxml2argvdata/iothreads-ids.args | 5 +++-
...othreads-virtio-scsi-ccw.s390x-latest.args | 5 +++-
...threads-virtio-scsi-pci.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/iothreads.args | 5 +++-
tests/qemuxml2argvdata/kvm-features-off.args | 5 +++-
tests/qemuxml2argvdata/kvm-features.args | 5 +++-
tests/qemuxml2argvdata/kvm-pit-delay.args | 5 +++-
tests/qemuxml2argvdata/kvm-pit-discard.args | 5 +++-
.../kvmclock+eoi-disabled.args | 5 +++-
tests/qemuxml2argvdata/kvmclock.args | 5 +++-
.../launch-security-sev.x86_64-2.12.0.args | 5 +++-
.../luks-disks-source-qcow2.args | 5 +++-
tests/qemuxml2argvdata/luks-disks-source.args | 5 +++-
tests/qemuxml2argvdata/luks-disks.args | 5 +++-
.../mach-virt-console-virtio.args | 5 +++-
.../mach-virt-serial-native.args | 5 +++-
.../mach-virt-serial-pci.args | 5 +++-
.../mach-virt-serial-usb.args | 5 +++-
.../machine-aeskeywrap-off-cap.args | 5 +++-
.../machine-aeskeywrap-off-caps.args | 5 +++-
.../machine-aeskeywrap-on-cap.args | 5 +++-
.../machine-aeskeywrap-on-caps.args | 5 +++-
tests/qemuxml2argvdata/machine-aliases1.args | 5 +++-
tests/qemuxml2argvdata/machine-aliases2.args | 5 +++-
tests/qemuxml2argvdata/machine-core-off.args | 5 +++-
tests/qemuxml2argvdata/machine-core-on.args | 5 +++-
.../machine-deakeywrap-off-cap.args | 5 +++-
.../machine-deakeywrap-off-caps.args | 5 +++-
.../machine-deakeywrap-on-cap.args | 5 +++-
.../machine-deakeywrap-on-caps.args | 5 +++-
.../machine-keywrap-none-caps.args | 5 +++-
.../machine-keywrap-none.args | 5 +++-
...ine-loadparm-multiple-disks-nets-s390.args | 5 +++-
.../machine-loadparm-net-s390.args | 5 +++-
.../machine-loadparm-s390.args | 5 +++-
tests/qemuxml2argvdata/machine-smm-opt.args | 5 +++-
.../qemuxml2argvdata/machine-vmport-opt.args | 5 +++-
tests/qemuxml2argvdata/master-key.args | 5 +++-
.../memfd-memory-numa.x86_64-latest.args | 5 +++-
.../memory-hotplug-dimm-addr.args | 5 +++-
.../qemuxml2argvdata/memory-hotplug-dimm.args | 5 +++-
...y-hotplug-nvdimm-access.x86_64-latest.args | 5 +++-
...ry-hotplug-nvdimm-align.x86_64-latest.args | 5 +++-
...ry-hotplug-nvdimm-label.x86_64-latest.args | 5 +++-
...ory-hotplug-nvdimm-pmem.x86_64-latest.args | 5 +++-
...hotplug-nvdimm-readonly.x86_64-latest.args | 5 +++-
.../memory-hotplug-nvdimm.x86_64-latest.args | 5 +++-
.../memory-hotplug-ppc64-nonuma.args | 5 +++-
tests/qemuxml2argvdata/memory-hotplug.args | 5 +++-
tests/qemuxml2argvdata/memtune-unlimited.args | 5 +++-
tests/qemuxml2argvdata/memtune.args | 5 +++-
.../migrate-numa-unaligned.args | 5 +++-
tests/qemuxml2argvdata/migrate.args | 5 +++-
.../minimal-msg-timestamp.args | 5 +++-
tests/qemuxml2argvdata/minimal-sandbox.args | 5 +++-
tests/qemuxml2argvdata/minimal.args | 5 +++-
tests/qemuxml2argvdata/misc-acpi.args | 5 +++-
tests/qemuxml2argvdata/misc-disable-s3.args | 5 +++-
.../misc-disable-suspends.args | 5 +++-
tests/qemuxml2argvdata/misc-enable-s4.args | 5 +++-
tests/qemuxml2argvdata/misc-no-reboot.args | 5 +++-
tests/qemuxml2argvdata/misc-uuid.args | 5 +++-
tests/qemuxml2argvdata/mlock-off.args | 5 +++-
tests/qemuxml2argvdata/mlock-on.args | 5 +++-
tests/qemuxml2argvdata/mlock-unsupported.args | 5 +++-
tests/qemuxml2argvdata/monitor-json.args | 5 +++-
.../multifunction-pci-device.args | 5 +++-
tests/qemuxml2argvdata/name-escape.args | 5 +++-
tests/qemuxml2argvdata/net-client.args | 5 +++-
tests/qemuxml2argvdata/net-eth-hostip.args | 5 +++-
tests/qemuxml2argvdata/net-eth-ifname.args | 5 +++-
tests/qemuxml2argvdata/net-eth-names.args | 5 +++-
tests/qemuxml2argvdata/net-eth.args | 5 +++-
.../net-hostdev-bootorder.args | 5 +++-
.../net-hostdev-multidomain.args | 5 +++-
.../net-hostdev-vfio-multidomain.args | 5 +++-
tests/qemuxml2argvdata/net-hostdev-vfio.args | 5 +++-
tests/qemuxml2argvdata/net-hostdev.args | 5 +++-
tests/qemuxml2argvdata/net-mcast.args | 5 +++-
tests/qemuxml2argvdata/net-server.args | 5 +++-
tests/qemuxml2argvdata/net-udp.args | 5 +++-
tests/qemuxml2argvdata/net-user-addr.args | 5 +++-
tests/qemuxml2argvdata/net-user.args | 5 +++-
.../net-vhostuser-multiq.args | 5 +++-
tests/qemuxml2argvdata/net-vhostuser.args | 5 +++-
.../net-vhostuser.x86_64-2.5.0.args | 5 +++-
.../net-vhostuser.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/net-virtio-ccw.args | 5 +++-
tests/qemuxml2argvdata/net-virtio-device.args | 5 +++-
.../net-virtio-disable-offloads.args | 5 +++-
tests/qemuxml2argvdata/net-virtio-netdev.args | 5 +++-
.../net-virtio-rxtxqueuesize.args | 5 +++-
tests/qemuxml2argvdata/net-virtio-s390.args | 5 +++-
tests/qemuxml2argvdata/net-virtio.args | 5 +++-
tests/qemuxml2argvdata/nosharepages.args | 5 +++-
.../numad-auto-memory-vcpu-cpuset.args | 5 +++-
...o-memory-vcpu-no-cpuset-and-placement.args | 5 +++-
.../numad-auto-vcpu-static-numatune.args | 5 +++-
.../numad-static-memory-auto-vcpu.args | 5 +++-
tests/qemuxml2argvdata/numad.args | 5 +++-
.../numatune-auto-nodeset-invalid.args | 5 +++-
.../numatune-auto-prefer.args | 5 +++-
.../qemuxml2argvdata/numatune-distances.args | 5 +++-
.../numatune-memnode-no-memory.args | 5 +++-
tests/qemuxml2argvdata/numatune-memnode.args | 5 +++-
tests/qemuxml2argvdata/numatune-memory.args | 5 +++-
.../qemuxml2argvdata/pages-dimm-discard.args | 5 +++-
.../pages-discard-hugepages.args | 5 +++-
tests/qemuxml2argvdata/pages-discard.args | 5 +++-
tests/qemuxml2argvdata/panic-double.args | 5 +++-
tests/qemuxml2argvdata/panic-no-address.args | 5 +++-
tests/qemuxml2argvdata/panic.args | 5 +++-
.../parallel-parport-chardev.args | 5 +++-
.../parallel-tcp-chardev.args | 5 +++-
.../parallel-unix-chardev.x86_64-2.5.0.args | 5 +++-
.../parallel-unix-chardev.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/pci-autoadd-addr.args | 5 +++-
tests/qemuxml2argvdata/pci-autoadd-idx.args | 5 +++-
tests/qemuxml2argvdata/pci-autofill-addr.args | 5 +++-
.../pci-bridge-many-disks.args | 5 +++-
tests/qemuxml2argvdata/pci-bridge.args | 5 +++-
tests/qemuxml2argvdata/pci-expander-bus.args | 5 +++-
tests/qemuxml2argvdata/pci-many.args | 5 +++-
tests/qemuxml2argvdata/pci-rom-disabled.args | 5 +++-
tests/qemuxml2argvdata/pci-rom.args | 5 +++-
.../pci-serial-dev-chardev.args | 5 +++-
tests/qemuxml2argvdata/pcie-expander-bus.args | 5 +++-
.../pcie-root-port-model-generic.args | 5 +++-
.../pcie-root-port-model-ioh3420.args | 5 +++-
tests/qemuxml2argvdata/pcie-root-port.args | 5 +++-
tests/qemuxml2argvdata/pcie-root.args | 5 +++-
.../pcie-switch-downstream-port.args | 5 +++-
.../pcie-switch-upstream-port.args | 5 +++-
tests/qemuxml2argvdata/pcihole64-q35.args | 5 +++-
tests/qemuxml2argvdata/pcihole64.args | 5 +++-
tests/qemuxml2argvdata/pmu-feature-off.args | 5 +++-
tests/qemuxml2argvdata/pmu-feature.args | 5 +++-
tests/qemuxml2argvdata/ppc-dtb.args | 5 +++-
.../ppc64-pseries-headless.ppc64-latest.args | 5 +++-
.../ppc64-usb-controller-legacy.args | 5 +++-
.../ppc64-usb-controller-qemu-xhci.args | 5 +++-
.../ppc64-usb-controller.args | 5 +++-
tests/qemuxml2argvdata/ppce500-serial.args | 5 +++-
tests/qemuxml2argvdata/pseries-basic.args | 5 +++-
.../pseries-console-virtio.args | 5 +++-
.../pseries-cpu-compat-power9.args | 5 +++-
.../qemuxml2argvdata/pseries-cpu-compat.args | 5 +++-
tests/qemuxml2argvdata/pseries-cpu-exact.args | 5 +++-
tests/qemuxml2argvdata/pseries-cpu-le.args | 5 +++-
tests/qemuxml2argvdata/pseries-features.args | 5 +++-
.../qemuxml2argvdata/pseries-hostdevs-1.args | 5 +++-
.../qemuxml2argvdata/pseries-hostdevs-2.args | 5 +++-
.../qemuxml2argvdata/pseries-hostdevs-3.args | 5 +++-
.../pseries-machine-max-cpu-compat.args | 5 +++-
.../pseries-many-buses-1.args | 5 +++-
.../pseries-many-buses-2.args | 5 +++-
.../pseries-many-devices.args | 5 +++-
tests/qemuxml2argvdata/pseries-nvram.args | 5 +++-
.../pseries-panic-missing.args | 5 +++-
.../pseries-panic-no-address.args | 5 +++-
.../pseries-phb-default-missing.args | 5 +++-
.../pseries-phb-numa-node.args | 5 +++-
.../qemuxml2argvdata/pseries-phb-simple.args | 5 +++-
.../pseries-serial-native.args | 5 +++-
.../qemuxml2argvdata/pseries-serial-pci.args | 5 +++-
.../qemuxml2argvdata/pseries-serial-usb.args | 5 +++-
.../qemuxml2argvdata/pseries-usb-default.args | 5 +++-
tests/qemuxml2argvdata/pseries-usb-kbd.args | 5 +++-
tests/qemuxml2argvdata/pseries-usb-multi.args | 5 +++-
.../pseries-vio-user-assigned.args | 5 +++-
tests/qemuxml2argvdata/pseries-vio.args | 5 +++-
.../pv-spinlock-disabled.args | 5 +++-
.../qemuxml2argvdata/pv-spinlock-enabled.args | 5 +++-
tests/qemuxml2argvdata/q35-acpi-nouefi.args | 5 +++-
tests/qemuxml2argvdata/q35-acpi-uefi.args | 5 +++-
.../q35-default-devices-only.args | 5 +++-
tests/qemuxml2argvdata/q35-multifunction.args | 5 +++-
tests/qemuxml2argvdata/q35-noacpi-nouefi.args | 5 +++-
.../q35-pci-force-address.args | 5 +++-
tests/qemuxml2argvdata/q35-pcie-autoadd.args | 5 +++-
tests/qemuxml2argvdata/q35-pcie.args | 5 +++-
.../q35-pm-disable-fallback.args | 5 +++-
tests/qemuxml2argvdata/q35-pm-disable.args | 5 +++-
tests/qemuxml2argvdata/q35-usb2-multi.args | 5 +++-
tests/qemuxml2argvdata/q35-usb2-reorder.args | 5 +++-
tests/qemuxml2argvdata/q35-usb2.args | 5 +++-
.../q35-virt-manager-basic.args | 5 +++-
tests/qemuxml2argvdata/q35-virtio-pci.args | 5 +++-
tests/qemuxml2argvdata/q35.args | 5 +++-
tests/qemuxml2argvdata/qemu-ns-alt.args | 5 +++-
.../qemu-ns-commandline-ns0.args | 5 +++-
.../qemu-ns-commandline-ns1.args | 5 +++-
.../qemuxml2argvdata/qemu-ns-commandline.args | 5 +++-
.../qemu-ns-domain-commandline-ns0.args | 5 +++-
.../qemu-ns-domain-commandline.args | 5 +++-
.../qemuxml2argvdata/qemu-ns-domain-ns0.args | 5 +++-
tests/qemuxml2argvdata/qemu-ns-no-env.args | 5 +++-
tests/qemuxml2argvdata/qemu-ns.args | 5 +++-
.../reboot-timeout-disabled.args | 5 +++-
.../reboot-timeout-enabled.args | 5 +++-
tests/qemuxml2argvdata/restore-v2-fd.args | 5 +++-
tests/qemuxml2argvdata/restore-v2.args | 5 +++-
.../riscv64-virt-headless.riscv64-latest.args | 5 +++-
tests/qemuxml2argvdata/riscv64-virt-pci.args | 5 +++-
tests/qemuxml2argvdata/riscv64-virt.args | 5 +++-
.../s390-allow-bogus-usb-controller.args | 5 +++-
.../s390-allow-bogus-usb-none.args | 5 +++-
.../qemuxml2argvdata/s390-panic-missing.args | 5 +++-
.../s390-panic-no-address.args | 5 +++-
tests/qemuxml2argvdata/s390-serial-2.args | 5 +++-
.../qemuxml2argvdata/s390-serial-console.args | 5 +++-
tests/qemuxml2argvdata/s390-serial.args | 5 +++-
.../s390x-ccw-headless.s390x-latest.args | 5 +++-
tests/qemuxml2argvdata/seclabel-dac-none.args | 5 +++-
.../seclabel-dynamic-baselabel.args | 5 +++-
.../seclabel-dynamic-labelskip.args | 5 +++-
.../seclabel-dynamic-override.args | 5 +++-
.../seclabel-dynamic-relabel.args | 5 +++-
tests/qemuxml2argvdata/seclabel-dynamic.args | 5 +++-
tests/qemuxml2argvdata/seclabel-none.args | 5 +++-
.../seclabel-static-labelskip.args | 5 +++-
.../seclabel-static-relabel.args | 5 +++-
tests/qemuxml2argvdata/seclabel-static.args | 5 +++-
.../serial-dev-chardev-iobase.args | 5 +++-
.../qemuxml2argvdata/serial-dev-chardev.args | 5 +++-
.../qemuxml2argvdata/serial-file-chardev.args | 5 +++-
tests/qemuxml2argvdata/serial-file-log.args | 5 +++-
.../qemuxml2argvdata/serial-many-chardev.args | 5 +++-
.../qemuxml2argvdata/serial-pty-chardev.args | 5 +++-
.../serial-spiceport-nospice.args | 5 +++-
tests/qemuxml2argvdata/serial-spiceport.args | 5 +++-
.../qemuxml2argvdata/serial-tcp-chardev.args | 5 +++-
.../serial-tcp-telnet-chardev.args | 5 +++-
.../serial-tcp-tlsx509-chardev-notls.args | 5 +++-
.../serial-tcp-tlsx509-chardev-verify.args | 5 +++-
.../serial-tcp-tlsx509-chardev.args | 5 +++-
.../serial-tcp-tlsx509-secret-chardev.args | 5 +++-
.../qemuxml2argvdata/serial-udp-chardev.args | 5 +++-
.../qemuxml2argvdata/serial-unix-chardev.args | 5 +++-
.../serial-unix-chardev.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/serial-vc-chardev.args | 5 +++-
.../shmem-plain-doorbell.args | 5 +++-
tests/qemuxml2argvdata/shmem.args | 5 +++-
.../smartcard-controller.args | 5 +++-
.../smartcard-host-certificates-database.args | 5 +++-
.../smartcard-host-certificates.args | 5 +++-
tests/qemuxml2argvdata/smartcard-host.args | 5 +++-
.../smartcard-passthrough-spicevmc.args | 5 +++-
.../smartcard-passthrough-tcp.args | 5 +++-
...artcard-passthrough-unix.x86_64-2.5.0.args | 5 +++-
...rtcard-passthrough-unix.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/smbios.args | 5 +++-
tests/qemuxml2argvdata/smp.args | 5 +++-
tests/qemuxml2argvdata/sound-device.args | 5 +++-
tests/qemuxml2argvdata/sound.args | 5 +++-
.../tpm-emulator-tpm2.x86_64-latest.args | 5 +++-
.../tpm-emulator.x86_64-latest.args | 5 +++-
.../qemuxml2argvdata/tpm-passthrough-crb.args | 5 +++-
tests/qemuxml2argvdata/tpm-passthrough.args | 5 +++-
.../tseg-explicit-size.x86_64-latest.args | 5 +++-
.../usb-controller-default-q35.args | 5 +++-
.../usb-controller-explicit-q35.args | 5 +++-
.../usb-controller-qemu-xhci.args | 5 +++-
.../qemuxml2argvdata/usb-controller-xhci.args | 5 +++-
tests/qemuxml2argvdata/usb-controller.args | 5 +++-
.../usb-hub-autoadd-deluxe.args | 5 +++-
tests/qemuxml2argvdata/usb-hub-autoadd.args | 5 +++-
tests/qemuxml2argvdata/usb-hub.args | 5 +++-
.../qemuxml2argvdata/usb-ich9-autoassign.args | 5 +++-
.../qemuxml2argvdata/usb-ich9-companion.args | 5 +++-
.../qemuxml2argvdata/usb-ich9-ehci-addr.args | 5 +++-
.../qemuxml2argvdata/usb-long-port-path.args | 5 +++-
tests/qemuxml2argvdata/usb-none.args | 5 +++-
.../usb-piix3-controller.args | 5 +++-
.../qemuxml2argvdata/usb-port-autoassign.args | 5 +++-
tests/qemuxml2argvdata/usb-port-missing.args | 5 +++-
tests/qemuxml2argvdata/usb-ports.args | 5 +++-
tests/qemuxml2argvdata/usb-redir-boot.args | 5 +++-
.../usb-redir-filter-version.args | 5 +++-
tests/qemuxml2argvdata/usb-redir-filter.args | 5 +++-
.../usb-redir-unix.x86_64-2.5.0.args | 5 +++-
.../usb-redir-unix.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/usb-redir.args | 5 +++-
.../qemuxml2argvdata/usb-xhci-autoassign.args | 5 +++-
tests/qemuxml2argvdata/usb1-usb2.args | 5 +++-
tests/qemuxml2argvdata/user-aliases-usb.args | 5 +++-
tests/qemuxml2argvdata/user-aliases.args | 5 +++-
.../vcpu-placement-static.args | 5 +++-
.../vhost-vsock-auto.x86_64-latest.args | 5 +++-
.../vhost-vsock-ccw-auto.s390x-latest.args | 5 +++-
.../vhost-vsock-ccw.s390x-latest.args | 5 +++-
.../vhost-vsock.x86_64-latest.args | 5 +++-
.../video-device-pciaddr-default.args | 5 +++-
tests/qemuxml2argvdata/video-none-device.args | 5 +++-
.../video-qxl-device-vgamem.args | 5 +++-
...video-qxl-device-vram64.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/video-qxl-device.args | 5 +++-
tests/qemuxml2argvdata/video-qxl-heads.args | 5 +++-
.../qemuxml2argvdata/video-qxl-nodevice.args | 5 +++-
tests/qemuxml2argvdata/video-qxl-noheads.args | 5 +++-
.../video-qxl-sec-device-vgamem.args | 5 +++-
...o-qxl-sec-device-vram64.x86_64-latest.args | 5 +++-
.../video-qxl-sec-device.args | 5 +++-
.../video-vga-device-vgamem.args | 5 +++-
tests/qemuxml2argvdata/video-vga-device.args | 5 +++-
.../qemuxml2argvdata/video-vga-nodevice.args | 5 +++-
.../qemuxml2argvdata/video-vga-qxl-heads.args | 5 +++-
.../video-virtio-gpu-ccw.args | 5 +++-
.../video-virtio-gpu-device.args | 5 +++-
.../video-virtio-gpu-sdl-gl.args | 5 +++-
.../video-virtio-gpu-secondary.args | 5 +++-
.../video-virtio-gpu-spice-gl.args | 5 +++-
.../video-virtio-gpu-virgl.args | 5 +++-
tests/qemuxml2argvdata/video-virtio-vga.args | 5 +++-
.../virtio-input-passthrough.args | 5 +++-
tests/qemuxml2argvdata/virtio-input.args | 5 +++-
tests/qemuxml2argvdata/virtio-lun.args | 5 +++-
.../virtio-non-transitional.x86_64-3.1.0.args | 5 +++-
...virtio-non-transitional.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/virtio-options.args | 5 +++-
tests/qemuxml2argvdata/virtio-rng-ccw.args | 5 +++-
.../qemuxml2argvdata/virtio-rng-default.args | 5 +++-
.../virtio-rng-egd-unix.x86_64-2.5.0.args | 5 +++-
.../virtio-rng-egd-unix.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/virtio-rng-egd.args | 5 +++-
.../qemuxml2argvdata/virtio-rng-multiple.args | 5 +++-
tests/qemuxml2argvdata/virtio-rng-random.args | 5 +++-
.../virtio-transitional.x86_64-3.1.0.args | 5 +++-
.../virtio-transitional.x86_64-latest.args | 5 +++-
tests/qemuxml2argvdata/vmcoreinfo.args | 5 +++-
tests/qemuxml2argvdata/watchdog-device.args | 5 +++-
tests/qemuxml2argvdata/watchdog-diag288.args | 5 +++-
tests/qemuxml2argvdata/watchdog-dump.args | 5 +++-
.../qemuxml2argvdata/watchdog-injectnmi.args | 5 +++-
tests/qemuxml2argvdata/watchdog.args | 5 +++-
tests/qemuxml2argvdata/x86-kvm-32-on-64.args | 5 +++-
.../x86_64-pc-headless.x86_64-latest.args | 5 +++-
.../x86_64-q35-headless.x86_64-latest.args | 5 +++-
688 files changed, 2784 insertions(+), 684 deletions(-)
--
2.20.1
5 years, 7 months
[libvirt] [PATCH 0/3] storage pool capabilities fixes
by Pavel Hrdina
Pavel Hrdina (3):
tests: use virTestCompareToFile in storagepoolcapstest
tests: invert the return logic in storagepoolcapstest
caps: drop requiredSourceElements from storage pool capabilities
docs/formatstoragecaps.html.in | 7 --
src/conf/storage_conf.c | 25 +------
.../storagepoolcapsschemadata/poolcaps-fs.xml | 67 -------------------
.../poolcaps-full.xml | 67 -------------------
tests/storagepoolcapstest.c | 17 ++---
5 files changed, 7 insertions(+), 176 deletions(-)
--
2.20.1
5 years, 7 months
[libvirt] [PATCH 0/5] util: Move some functions from virfile to virstring
by Andrea Bolognani
Andrea Bolognani (5):
util: Rename virFileHasSuffix() to virStringHasCaseSuffix()
util: Rename virFileStripSuffix() to virStringStripSuffix()
util: Rename virFileMatchesNameSuffix() to
virStringMatchesNameSuffix()
util: Add virStringHasSuffix()
Use virStringHasSuffix() where possible
src/conf/virdomainobjlist.c | 2 +-
src/conf/virnetworkobj.c | 4 +-
src/conf/virnwfilterbindingobjlist.c | 2 +-
src/conf/virnwfilterobj.c | 2 +-
src/conf/virsecretobj.c | 4 +-
src/conf/virstorageobj.c | 6 +--
src/esx/esx_driver.c | 2 +-
src/esx/esx_storage_backend_vmfs.c | 4 +-
src/libvirt_private.syms | 7 ++--
src/util/virfile.c | 48 ----------------------
src/util/virfile.h | 10 -----
src/util/virstoragefile.c | 2 +-
src/util/virstring.c | 60 ++++++++++++++++++++++++++++
src/util/virstring.h | 10 +++++
src/vmware/vmware_conf.c | 2 +-
src/vmx/vmx.c | 12 +++---
tests/testutils.c | 4 +-
tests/testutilsqemu.c | 2 +-
tests/virschematest.c | 4 +-
tools/nss/libvirt_nss.c | 4 +-
20 files changed, 102 insertions(+), 89 deletions(-)
--
2.20.1
5 years, 8 months
[libvirt] [PATCH] Drop some useless comparisons and checks
by Michal Privoznik
In these cases the check that is removed has been done a few
lines above already (as can even be seen in the context). Drop
them.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
examples/dommigrate/dommigrate.c | 3 +--
src/conf/nwfilter_conf.c | 4 +---
src/qemu/qemu_command.c | 3 +--
src/qemu/qemu_hotplug.c | 20 +++++++++-----------
src/util/virresctrl.c | 2 +-
tools/virsh-snapshot.c | 5 ++---
6 files changed, 15 insertions(+), 22 deletions(-)
diff --git a/examples/dommigrate/dommigrate.c b/examples/dommigrate/dommigrate.c
index 1b6072d138..60cfb3fb83 100644
--- a/examples/dommigrate/dommigrate.c
+++ b/examples/dommigrate/dommigrate.c
@@ -37,51 +37,50 @@ int
main(int argc, char *argv[])
{
char *src_uri, *dst_uri, *domname;
int ret = 0;
virConnectPtr conn = NULL;
virDomainPtr dom = NULL;
if (argc < 4) {
ret = usage(argv[0], 1);
goto out;
}
src_uri = argv[1];
dst_uri = argv[2];
domname = argv[3];
printf("Attempting to connect to the source hypervisor...\n");
conn = virConnectOpenAuth(src_uri, virConnectAuthPtrDefault, 0);
if (!conn) {
ret = 1;
fprintf(stderr, "No connection to the source hypervisor: %s.\n",
virGetLastErrorMessage());
goto out;
}
printf("Attempting to retrieve domain %s...\n", domname);
dom = virDomainLookupByName(conn, domname);
if (!dom) {
fprintf(stderr, "Failed to find domain %s.\n", domname);
goto cleanup;
}
printf("Attempting to migrate %s to %s...\n", domname, dst_uri);
if ((ret = virDomainMigrateToURI(dom, dst_uri,
VIR_MIGRATE_PEER2PEER,
NULL, 0)) != 0) {
fprintf(stderr, "Failed to migrate domain %s.\n", domname);
goto cleanup;
}
printf("Migration finished with success.\n");
cleanup:
if (dom != NULL)
virDomainFree(dom);
- if (conn != NULL)
- virConnectClose(conn);
+ virConnectClose(conn);
out:
return ret;
}
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index 7cad3ccc57..3f28c7b451 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -2610,128 +2610,126 @@ static virNWFilterDefPtr
virNWFilterDefParseXML(xmlXPathContextPtr ctxt)
{
virNWFilterDefPtr ret;
xmlNodePtr curr = ctxt->node;
char *uuid = NULL;
char *chain = NULL;
char *chain_pri_s = NULL;
virNWFilterEntryPtr entry;
int chain_priority;
const char *name_prefix;
if (VIR_ALLOC(ret) < 0)
return NULL;
ret->name = virXPathString("string(./@name)", ctxt);
if (!ret->name) {
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("filter has no name"));
goto cleanup;
}
chain_pri_s = virXPathString("string(./@priority)", ctxt);
if (chain_pri_s) {
if (virStrToLong_i(chain_pri_s, NULL, 10, &chain_priority) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
_("Could not parse chain priority '%s'"),
chain_pri_s);
goto cleanup;
}
if (chain_priority < NWFILTER_MIN_FILTER_PRIORITY ||
chain_priority > NWFILTER_MAX_FILTER_PRIORITY) {
virReportError(VIR_ERR_INVALID_ARG,
_("Priority '%d' is outside valid "
"range of [%d,%d]"),
chain_priority,
NWFILTER_MIN_FILTER_PRIORITY,
NWFILTER_MAX_FILTER_PRIORITY);
goto cleanup;
}
}
chain = virXPathString("string(./@chain)", ctxt);
if (chain) {
name_prefix = virNWFilterIsAllowedChain(chain);
if (name_prefix == NULL)
goto cleanup;
ret->chainsuffix = chain;
if (chain_pri_s) {
ret->chainPriority = chain_priority;
} else {
/* assign default priority if none can be found via lookup */
- if (!name_prefix ||
- intMapGetByString(chain_priorities, name_prefix, 0,
- &ret->chainPriority) < 0) {
+ if (intMapGetByString(chain_priorities, name_prefix, 0, &ret->chainPriority) < 0) {
/* assign default chain priority */
ret->chainPriority = (NWFILTER_MAX_FILTER_PRIORITY +
NWFILTER_MIN_FILTER_PRIORITY) / 2;
}
}
chain = NULL;
} else {
if (VIR_STRDUP(ret->chainsuffix,
virNWFilterChainSuffixTypeToString(VIR_NWFILTER_CHAINSUFFIX_ROOT)) < 0)
goto cleanup;
}
uuid = virXPathString("string(./uuid)", ctxt);
ret->uuid_specified = (uuid != NULL);
if (uuid == NULL) {
if (virUUIDGenerate(ret->uuid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("unable to generate uuid"));
goto cleanup;
}
} else {
if (virUUIDParse(uuid, ret->uuid) < 0) {
virReportError(VIR_ERR_XML_ERROR,
"%s", _("malformed uuid element"));
goto cleanup;
}
VIR_FREE(uuid);
}
curr = curr->children;
while (curr != NULL) {
if (curr->type == XML_ELEMENT_NODE) {
if (VIR_ALLOC(entry) < 0)
goto cleanup;
if (virXMLNodeNameEqual(curr, "rule")) {
if (!(entry->rule = virNWFilterRuleParse(curr))) {
virNWFilterEntryFree(entry);
goto cleanup;
}
} else if (virXMLNodeNameEqual(curr, "filterref")) {
if (!(entry->include = virNWFilterIncludeParse(curr))) {
virNWFilterEntryFree(entry);
goto cleanup;
}
}
if (entry->rule || entry->include) {
if (VIR_APPEND_ELEMENT_COPY(ret->filterEntries,
ret->nentries, entry) < 0) {
virNWFilterEntryFree(entry);
goto cleanup;
}
} else {
virNWFilterEntryFree(entry);
}
}
curr = curr->next;
}
VIR_FREE(chain);
VIR_FREE(chain_pri_s);
return ret;
cleanup:
virNWFilterDefFree(ret);
VIR_FREE(chain);
VIR_FREE(uuid);
VIR_FREE(chain_pri_s);
return NULL;
}
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 74f34af292..ee70444bd4 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4201,31 +4201,30 @@ static int
qemuBuildNVRAMCommandLine(virCommandPtr cmd,
const virDomainDef *def,
virQEMUCapsPtr qemuCaps)
{
if (!def->nvram)
return 0;
if (qemuDomainIsPSeries(def)) {
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_NVRAM)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("nvram device is not supported by "
"this QEMU binary"));
return -1;
}
char *optstr;
virCommandAddArg(cmd, "-global");
optstr = qemuBuildNVRAMDevStr(def->nvram);
if (!optstr)
return -1;
- if (optstr)
- virCommandAddArg(cmd, optstr);
+ virCommandAddArg(cmd, optstr);
VIR_FREE(optstr);
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("nvram device is only supported for PPC64"));
return -1;
}
return 0;
}
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 00dbff6b2a..19b7e6e8ea 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3502,52 +3502,50 @@ static int
qemuDomainChangeNetBridge(virDomainObjPtr vm,
virDomainNetDefPtr olddev,
virDomainNetDefPtr newdev)
{
int ret = -1;
const char *oldbridge = virDomainNetGetActualBridgeName(olddev);
const char *newbridge = virDomainNetGetActualBridgeName(newdev);
if (!oldbridge || !newbridge) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Missing bridge name"));
goto cleanup;
}
VIR_DEBUG("Change bridge for interface %s: %s -> %s",
olddev->ifname, oldbridge, newbridge);
if (virNetDevExists(newbridge) != 1) {
virReportError(VIR_ERR_OPERATION_FAILED,
_("bridge %s doesn't exist"), newbridge);
goto cleanup;
}
- if (oldbridge) {
- ret = virNetDevBridgeRemovePort(oldbridge, olddev->ifname);
- virDomainAuditNet(vm, olddev, NULL, "detach", ret == 0);
- if (ret < 0) {
- /* warn but continue - possibly the old network
- * had been destroyed and reconstructed, leaving the
- * tap device orphaned.
- */
- VIR_WARN("Unable to detach device %s from bridge %s",
- olddev->ifname, oldbridge);
- }
+ ret = virNetDevBridgeRemovePort(oldbridge, olddev->ifname);
+ virDomainAuditNet(vm, olddev, NULL, "detach", ret == 0);
+ if (ret < 0) {
+ /* warn but continue - possibly the old network
+ * had been destroyed and reconstructed, leaving the
+ * tap device orphaned.
+ */
+ VIR_WARN("Unable to detach device %s from bridge %s",
+ olddev->ifname, oldbridge);
}
ret = virNetDevBridgeAddPort(newbridge, olddev->ifname);
virDomainAuditNet(vm, NULL, newdev, "attach", ret == 0);
if (ret < 0) {
ret = virNetDevBridgeAddPort(oldbridge, olddev->ifname);
virDomainAuditNet(vm, NULL, olddev, "attach", ret == 0);
if (ret < 0) {
virReportError(VIR_ERR_OPERATION_FAILED,
_("unable to recover former state by adding port "
"to bridge %s"), oldbridge);
}
goto cleanup;
}
/* caller will replace entire olddev with newdev in domain nets list */
ret = 0;
cleanup:
return ret;
}
diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c
index 97891b2f8f..0857d4e882 100644
--- a/src/util/virresctrl.c
+++ b/src/util/virresctrl.c
@@ -2111,57 +2111,57 @@ static int
virResctrlAllocMemoryBandwidth(virResctrlInfoPtr resctrl,
virResctrlAllocPtr alloc,
virResctrlAllocPtr free)
{
size_t i;
virResctrlAllocMemBWPtr mem_bw_alloc = alloc->mem_bw;
virResctrlAllocMemBWPtr mem_bw_free = free->mem_bw;
virResctrlInfoMemBWPtr mem_bw_info = resctrl->membw_info;
if (!mem_bw_alloc)
return 0;
- if (mem_bw_alloc && !mem_bw_info) {
+ if (!mem_bw_info) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("RDT Memory Bandwidth allocation unsupported"));
return -1;
}
for (i = 0; i < mem_bw_alloc->nbandwidths; i++) {
if (!mem_bw_alloc->bandwidths[i])
continue;
if (*(mem_bw_alloc->bandwidths[i]) % mem_bw_info->bandwidth_granularity) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Memory Bandwidth allocation of size "
"%u is not divisible by granularity %u"),
*(mem_bw_alloc->bandwidths[i]),
mem_bw_info->bandwidth_granularity);
return -1;
}
if (*(mem_bw_alloc->bandwidths[i]) < mem_bw_info->min_bandwidth) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Memory Bandwidth allocation of size "
"%u is smaller than the minimum "
"allowed allocation %u"),
*(mem_bw_alloc->bandwidths[i]),
mem_bw_info->min_bandwidth);
return -1;
}
if (i > mem_bw_info->max_id) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("bandwidth controller id %zd does not "
"exist, max controller id %u"),
i, mem_bw_info->max_id);
return -1;
}
if (*(mem_bw_alloc->bandwidths[i]) > *(mem_bw_free->bandwidths[i])) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Not enough room for allocation of %u%% "
"bandwidth on node %zd, available bandwidth %u%%"),
*(mem_bw_alloc->bandwidths[i]), i,
*(mem_bw_free->bandwidths[i]));
return -1;
}
}
return 0;
}
diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c
index e38ebb1f28..025321c58e 100644
--- a/tools/virsh-snapshot.c
+++ b/tools/virsh-snapshot.c
@@ -1046,323 +1046,322 @@ static virshSnapshotListPtr
virshSnapshotListCollect(vshControl *ctl, virDomainPtr dom,
virDomainSnapshotPtr from,
unsigned int orig_flags, bool tree)
{
size_t i;
char **names = NULL;
int count = -1;
bool descendants = false;
bool roots = false;
virDomainSnapshotPtr *snaps;
virshSnapshotListPtr snaplist = vshMalloc(ctl, sizeof(*snaplist));
virshSnapshotListPtr ret = NULL;
const char *fromname = NULL;
int start_index = -1;
int deleted = 0;
bool filter_fallback = false;
unsigned int flags = orig_flags;
virshControlPtr priv = ctl->privData;
/* Try the interface available in 0.9.13 and newer. */
if (!priv->useSnapshotOld) {
if (from)
count = virDomainSnapshotListAllChildren(from, &snaps, flags);
else
count = virDomainListAllSnapshots(dom, &snaps, flags);
/* If we failed because of flags added in 1.0.1, we can do
* fallback filtering. */
if (count < 0 && last_error->code == VIR_ERR_INVALID_ARG &&
flags & (VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS |
VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION)) {
flags &= ~(VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS |
VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION);
vshResetLibvirtError();
filter_fallback = true;
if (from)
count = virDomainSnapshotListAllChildren(from, &snaps, flags);
else
count = virDomainListAllSnapshots(dom, &snaps, flags);
}
}
if (count >= 0) {
/* When mixing --from and --tree, we also want a copy of from
* in the list, but with no parent for that one entry. */
snaplist->snaps = vshCalloc(ctl, count + (tree && from),
sizeof(*snaplist->snaps));
snaplist->nsnaps = count;
for (i = 0; i < count; i++)
snaplist->snaps[i].snap = snaps[i];
VIR_FREE(snaps);
if (tree) {
for (i = 0; i < count; i++) {
if (virshGetSnapshotParent(ctl, snaplist->snaps[i].snap,
&snaplist->snaps[i].parent) < 0)
goto cleanup;
}
if (from) {
snaplist->snaps[snaplist->nsnaps++].snap = from;
virDomainSnapshotRef(from);
}
}
goto success;
}
/* Assume that if we got this far, then the --no-leaves and
* --no-metadata flags were not supported. Disable groups that
* have no impact. */
/* XXX should we emulate --no-leaves? */
if (flags & VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES &&
flags & VIR_DOMAIN_SNAPSHOT_LIST_LEAVES)
flags &= ~(VIR_DOMAIN_SNAPSHOT_LIST_NO_LEAVES |
VIR_DOMAIN_SNAPSHOT_LIST_LEAVES);
if (flags & VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA &&
flags & VIR_DOMAIN_SNAPSHOT_LIST_METADATA)
flags &= ~(VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA |
VIR_DOMAIN_SNAPSHOT_LIST_METADATA);
if (flags & VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA) {
/* We can emulate --no-metadata if --metadata was supported,
* since it was an all-or-none attribute on old servers. */
count = virDomainSnapshotNum(dom,
VIR_DOMAIN_SNAPSHOT_LIST_METADATA);
if (count < 0)
goto cleanup;
if (count > 0)
return snaplist;
flags &= ~VIR_DOMAIN_SNAPSHOT_LIST_NO_METADATA;
}
if (flags & (VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS |
VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION)) {
flags &= ~(VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS |
VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION);
filter_fallback = true;
}
/* This uses the interfaces available in 0.8.0-0.9.6
* (virDomainSnapshotListNames, global list only) and in
* 0.9.7-0.9.12 (addition of virDomainSnapshotListChildrenNames
* for child listing, and new flags), as follows, with [*] by the
* combinations that need parent info (either for filtering
* purposes or for the resulting tree listing):
* old new
* list global as-is global as-is
* list --roots *global + filter global + flags
* list --from *global + filter child as-is
* list --from --descendants *global + filter child + flags
* list --tree *global as-is *global as-is
* list --tree --from *global + filter *child + flags
*
* Additionally, when --tree and --from are both used, from is
* added to the final list as the only element without a parent.
* Otherwise, --from does not appear in the final list.
*/
if (from) {
fromname = virDomainSnapshotGetName(from);
if (!fromname) {
vshError(ctl, "%s", _("Could not get snapshot name"));
goto cleanup;
}
descendants = (flags & VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS) || tree;
if (tree)
flags |= VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS;
/* Determine if we can use the new child listing API. */
if (priv->useSnapshotOld ||
((count = virDomainSnapshotNumChildren(from, flags)) < 0 &&
last_error->code == VIR_ERR_NO_SUPPORT)) {
/* We can emulate --from. */
/* XXX can we also emulate --leaves? */
vshResetLibvirtError();
priv->useSnapshotOld = true;
flags &= ~VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS;
goto global;
}
if (tree && count >= 0)
count++;
} else {
global:
/* Global listing (including fallback when --from failed with
* child listing). */
count = virDomainSnapshotNum(dom, flags);
/* Fall back to simulation if --roots was unsupported. */
/* XXX can we also emulate --leaves? */
if (!from && count < 0 && last_error->code == VIR_ERR_INVALID_ARG &&
(flags & VIR_DOMAIN_SNAPSHOT_LIST_ROOTS)) {
vshResetLibvirtError();
roots = true;
flags &= ~VIR_DOMAIN_SNAPSHOT_LIST_ROOTS;
count = virDomainSnapshotNum(dom, flags);
}
}
if (count < 0) {
if (!last_error)
vshError(ctl, _("failed to collect snapshot list"));
goto cleanup;
}
if (!count)
goto success;
names = vshCalloc(ctl, sizeof(*names), count);
/* Now that we have a count, collect the list. */
if (from && !priv->useSnapshotOld) {
if (tree) {
- if (count)
- count = virDomainSnapshotListChildrenNames(from, names + 1,
- count - 1, flags);
+ count = virDomainSnapshotListChildrenNames(from, names + 1,
+ count - 1, flags);
if (count >= 0) {
count++;
names[0] = vshStrdup(ctl, fromname);
}
} else {
count = virDomainSnapshotListChildrenNames(from, names,
count, flags);
}
} else {
count = virDomainSnapshotListNames(dom, names, count, flags);
}
if (count < 0)
goto cleanup;
snaplist->snaps = vshCalloc(ctl, sizeof(*snaplist->snaps), count);
snaplist->nsnaps = count;
for (i = 0; i < count; i++) {
snaplist->snaps[i].snap = virDomainSnapshotLookupByName(dom,
names[i], 0);
if (!snaplist->snaps[i].snap)
goto cleanup;
}
/* Collect parents when needed. With the new API, --tree and
* --from together put from as the first element without a parent;
* with the old API we still need to do a post-process filtering
* based on all parent information. */
if (tree || (from && priv->useSnapshotOld) || roots) {
for (i = (from && !priv->useSnapshotOld); i < count; i++) {
if (from && priv->useSnapshotOld && STREQ(names[i], fromname)) {
start_index = i;
if (tree)
continue;
}
if (virshGetSnapshotParent(ctl, snaplist->snaps[i].snap,
&snaplist->snaps[i].parent) < 0)
goto cleanup;
if ((from && ((tree && !snaplist->snaps[i].parent) ||
(!descendants &&
STRNEQ_NULLABLE(fromname,
snaplist->snaps[i].parent)))) ||
(roots && snaplist->snaps[i].parent)) {
virshDomainSnapshotFree(snaplist->snaps[i].snap);
snaplist->snaps[i].snap = NULL;
VIR_FREE(snaplist->snaps[i].parent);
deleted++;
}
}
}
if (tree)
goto success;
if (priv->useSnapshotOld && descendants) {
bool changed = false;
bool remaining = false;
/* Make multiple passes over the list - first pass finds
* direct children and NULLs out all roots and from, remaining
* passes NULL out any undecided entry whose parent is not
* still in list. We mark known descendants by clearing
* snaps[i].parents. Sorry, this is O(n^3) - hope your
* hierarchy isn't huge. XXX Is it worth making O(n^2 log n)
* by using qsort and bsearch? */
if (start_index < 0) {
vshError(ctl, _("snapshot %s disappeared from list"), fromname);
goto cleanup;
}
for (i = 0; i < count; i++) {
if (i == start_index || !snaplist->snaps[i].parent) {
VIR_FREE(names[i]);
virshDomainSnapshotFree(snaplist->snaps[i].snap);
snaplist->snaps[i].snap = NULL;
VIR_FREE(snaplist->snaps[i].parent);
deleted++;
} else if (STREQ(snaplist->snaps[i].parent, fromname)) {
VIR_FREE(snaplist->snaps[i].parent);
changed = true;
} else {
remaining = true;
}
}
if (!changed) {
ret = vshMalloc(ctl, sizeof(*snaplist));
goto cleanup;
}
while (changed && remaining) {
changed = remaining = false;
for (i = 0; i < count; i++) {
bool found_parent = false;
size_t j;
if (!names[i] || !snaplist->snaps[i].parent)
continue;
for (j = 0; j < count; j++) {
if (!names[j] || i == j)
continue;
if (STREQ(snaplist->snaps[i].parent, names[j])) {
found_parent = true;
if (!snaplist->snaps[j].parent)
VIR_FREE(snaplist->snaps[i].parent);
else
remaining = true;
break;
}
}
if (!found_parent) {
changed = true;
VIR_FREE(names[i]);
virshDomainSnapshotFree(snaplist->snaps[i].snap);
snaplist->snaps[i].snap = NULL;
VIR_FREE(snaplist->snaps[i].parent);
deleted++;
}
}
}
}
success:
if (filter_fallback) {
/* Older API didn't filter on status or location, but the
* information is available in domain XML. */
if (!(orig_flags & VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS))
orig_flags |= VIR_DOMAIN_SNAPSHOT_FILTERS_STATUS;
if (!(orig_flags & VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION))
orig_flags |= VIR_DOMAIN_SNAPSHOT_FILTERS_LOCATION;
for (i = 0; i < snaplist->nsnaps; i++) {
switch (virshSnapshotFilter(ctl, snaplist->snaps[i].snap,
orig_flags)) {
case 1:
break;
case 0:
virshDomainSnapshotFree(snaplist->snaps[i].snap);
snaplist->snaps[i].snap = NULL;
VIR_FREE(snaplist->snaps[i].parent);
deleted++;
break;
default:
goto cleanup;
}
}
}
qsort(snaplist->snaps, snaplist->nsnaps, sizeof(*snaplist->snaps),
virshSnapSorter);
snaplist->nsnaps -= deleted;
VIR_STEAL_PTR(ret, snaplist);
cleanup:
virshSnapshotListFree(snaplist);
if (names && count > 0)
for (i = 0; i < count; i++)
VIR_FREE(names[i]);
VIR_FREE(names);
return ret;
}
--
2.19.2
5 years, 8 months
[libvirt] [PATCH 00/10] domcaps: use virTristateBool
by Cole Robinson
Extending domaincapabilities with new XML schema is currently a bit of
a maintenance pain. Consider the case of adding a new enum for listing
<sound> models. I want to output this info for the qemu driver.
Internally in the domaincapabilities plumbing, whether a <device> is
supported= is tracked with boolean true/false. If I extend that
pattern for <sound> devices and fill in data for the qemu driver, the
other domcaps implementations will now automatically output a new XML
element:
<sound supported='no'>
Now, for bhyve I can 'git grep' confirm that it doesn't have any
<sound> support, but for xen/libxl it _is_ supported. So if I don't
fill in accurate support in the xen driver, I've just made their
domcaps report blatantly incorrect info.
Ideally I would make these <sound> changes and the other drivers output
would _not_ change. xen output would now be incomplete, but not
obviously wrong, which is easier on me the developer, and safer for the
API consumer.
This moves domcaps plumbing in that direction. It switches most
internal 'supported' fields to virTristateBool so we can track an
ABSENT state and map that to outputting no XML. Explicit supported='no'
values are filled in where needed to ensure existing driver XML doesn't
change. cpu and sev supported= values are left unconverted, but they
require semi-special handling anyways so aren't really affected by the
problem I laid out above.
Cole Robinson (10):
tests: domcaps: Add a default 'empty' test
tests: domcaps: Remove unused typedef
tests: domcaps: Remove 'full' test
conf: domcaps: Add single line formatting macro
conf: domcaps: use virTristateBool for 'supported'
qemu: domcaps: fill in explicit supported BOOL_NO
libxl: domcaps: fill in explicit supported BOOL_NO
bhyve: domcaps: fill in explicit supported BOOL_NO
schemas: domcaps: Make more elements optional
conf: domcaps: Don't output XML on tristate ABSENT
docs/schemas/domaincaps.rng | 20 +++++--
src/bhyve/bhyve_capabilities.c | 20 +++++--
src/conf/domain_capabilities.c | 26 ++++++----
src/conf/domain_capabilities.h | 20 +++----
src/libxl/libxl_capabilities.c | 18 ++++---
src/qemu/qemu_capabilities.c | 26 ++++++----
tests/domaincapsschemadata/empty.xml | 16 ++++++
tests/domaincapstest.c | 78 ++--------------------------
8 files changed, 103 insertions(+), 121 deletions(-)
create mode 100644 tests/domaincapsschemadata/empty.xml
--
2.20.1
5 years, 8 months
[libvirt] [PATCH v2 00/17] Add support to list Storage Driver backend capabilities
by John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2019-January/msg00479.html
Changes since v1:
* The first 4 patches were already R-by'd and pushed.
* From v1, rework patch 5 & 6 into what now is patches 8 & 9. The
format of the output for what results in the output for the
connectGetCapabilities (virConnectGetCapabilities).
* From v1, drop patch 7
* In v2, patches 1-7 are new as a result of work done for patches 10-17.
patches 1-5 were posted upstream, but left unreviewed:
https://www.redhat.com/archives/libvir-list/2019-February/msg00333.html
These essentially ensure the volOptions and poolOptions don't list
or use something unexpected per documentation. The doc patch is a
simple update to add some missing text and fix an entry
* Patches 10-17 are new to implement the ability to get/format the
Storage Driver backend capabilities via:
storageConnectGetStoragePoolCapabilities
virConnectGetStoragePoolCapabilities
similar to how virConnectGetDomainCapabilities returns domain specific
output. The output is essentially what is provided in the poolOptions
and volOptions from storage_conf as valid values for format type fields
for pool and/or volume as well as an enumerated list for the required
source elements for creation. Whether the latter is useful or not was
not clear, but since it is something that can cause a creation error
when missing, I figured it'd be useful. The new virsh command follows
then domcapabilities nomenclature.
John Ferlan (17):
conf: Remove volOptions for VIR_STORAGE_POOL_SHEEPDOG
conf: Remove volOptions for VIR_STORAGE_POOL_RBD
conf: Remove volOptions for VIR_STORAGE_POOL_SCSI
conf: Remove volOptions for VIR_STORAGE_POOL_ISCSI[_DIRECT]
conf: Remove volOptions for VIR_STORAGE_POOL_MPATH
conf: Remove defaultFormat from VIR_STORAGE_POOL_ZFS
docs: Fix a few storage.html.in typos
conf: Introduce storage pool functions into capabilities
storage: Process storage pool capabilities
docs: Add schema for storage pool capabilities
conf: Add storage pool capability formatting
tests: Introduce storage pool capabilites test
docs: Add description for Storage Pool Capabilities
libvirt: Introduce virConnectGetStoragePoolCapabilities
storage: Introduce storageConnectGetStoragePoolCapabilities
virsh: Expose virConnectGetStoragePoolCapabilities
docs: Add news article
docs/docs.html.in | 1 +
docs/format.html.in | 1 +
docs/formatstoragecaps.html.in | 108 +++++++
docs/index.html.in | 1 +
docs/news.xml | 12 +
docs/schemas/storagepoolcaps.rng | 88 ++++++
docs/storage.html.in | 8 +-
include/libvirt/libvirt-storage.h | 4 +
libvirt.spec.in | 1 +
mingw-libvirt.spec.in | 2 +
src/conf/Makefile.inc.am | 2 +
src/conf/capabilities.c | 74 +++++
src/conf/capabilities.h | 15 +
src/conf/storage_capabilities.c | 135 +++++++++
src/conf/storage_capabilities.h | 41 +++
src/conf/storage_conf.c | 131 +++++++--
src/conf/storage_conf.h | 7 +
src/conf/virstorageobj.h | 5 +
src/driver-storage.h | 5 +
src/libvirt-storage.c | 40 +++
src/libvirt_private.syms | 8 +
src/libvirt_public.syms | 5 +
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 15 +-
src/remote_protocol-structs | 7 +
src/storage/storage_backend.c | 16 ++
src/storage/storage_backend.h | 3 +
src/storage/storage_driver.c | 44 +++
tests/Makefile.am | 7 +
.../storagepoolcapsschemadata/poolcaps-fs.xml | 268 ++++++++++++++++++
.../poolcaps-full.xml | 268 ++++++++++++++++++
tests/storagepoolcapstest.c | 124 ++++++++
tests/storagevolxml2xmlout/vol-sheepdog.xml | 1 -
tests/virschematest.c | 1 +
tools/virsh-pool.c | 42 +++
tools/virsh.pod | 7 +
36 files changed, 1473 insertions(+), 25 deletions(-)
create mode 100644 docs/formatstoragecaps.html.in
create mode 100644 docs/schemas/storagepoolcaps.rng
create mode 100644 src/conf/storage_capabilities.c
create mode 100644 src/conf/storage_capabilities.h
create mode 100644 tests/storagepoolcapsschemadata/poolcaps-fs.xml
create mode 100644 tests/storagepoolcapsschemadata/poolcaps-full.xml
create mode 100644 tests/storagepoolcapstest.c
--
2.20.1
5 years, 8 months
[libvirt] lxc container stopped not each time
by mxs kolo
Hi all.
I download ftp://libvirt.org/libvirt/libvirt-5.1.0.tar.xz and build
rpms with lxc support.
LXC containers can be started, but time to time can't be stopped.
With option --mode initctl containers always stopped, but virsh reported error:
"Container does not provide an initctl pipe"
Inside container present /dev/initctl:
# ls -la /dev/initctl
lrwxrwxrwx 1 root root 25 Mar 5 18:40 /dev/initctl -> /run/systemd/initctl/fifo
With option --mode signal, centos 7.5/7.6 systemd not stopped and
rebooted, in containers log:
systemd: Received SIGTERM.
systemd: Reexecuting.
systemd: systemd 219 running in system mode. (+PAM +AUDIT +SELINUX
+IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS
+ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
systemd: Detected virtualization lxc-libvirt.
systemd: Detected architecture x86-64.
Runlevel inside container before and after - is 5.
Without option --mode container can stop, mostly when you in gdb
step-by-step debug.
But most often not, with simptoms as with --mode signal. Patch in
attachment fix problem for my environment. Tested only with host
centos 7.6 and guests centos 7.5/7.6
Short comments on patch.
lxcDomainShutdownFlags() return rc 0 and container begin stopped.
We not go to endjob label, but later we pass check:
if (rc == 0 &&
(flags == 0 ||
(flags & VIR_DOMAIN_SHUTDOWN_SIGNAL))) {
and trying next shutdown method with sigterm to pid1.
If container heavy loaded (or waiting in gdb for input), it not
stopped. But if container small, first method with initctl stop
container before second method would be call
b.r.
Maxim Kozin
5 years, 8 months