[libvirt] [PATCH 00/12] qemu: support chardev for all machvirt config
by Cole Robinson
Drew pointed out that we can use -chardev with machvirt platform
serial devices like:
-chardev pty,id=foo
-serial chardev:foo
And indeed it looks like qemu has supported this for as long as -chardev
has been around. Wiring this up will enable all the modern -chardev
features for every machvirt config (and some other arch/machine types).
However just enabling that change is going to cause a lot of unneeded
test suite churn, due to the fact that some code is still checking for
qemu -chardev support, even though our minimum qemu version always has
chardev nowadays. So take the opportunity to exorcise QEMU_CAPS_CHARDEV
* Patch 1 reverts Christopher's recent patch, to unbreak existing configs
* Patch 2-3 make pci-serial work for machvirt and demonstrate it with a
test suite change.
* Patch 4-10 slowly strip out QEMU_CAPS_DEVICE
* Patch 11 adds -chardev support for platform serial devices
* Patch 12 is a cleanup
Cole Robinson (12):
Revert "qemu: Support chardevs with ARM virt machines"
qemu: caps: Tweak arm conditional in SupportsChardev
tests: qemuxml2argv: Add an aarch64 pci-serial test
qemu: command: Remove old style -parallel building
qemu: command: Drop some QEMU_CAPS_CHARDEV checks
qemu: command: always use -chardev for monitor config
tests: qemuxml2argv: drop redundant serial testing
tests: qemuxml2argv: Drop old style serial testing
tests: qemuxml2argv: Add some QEMU_CAPS_CHARDEV annotations
qemu: caps: blacklist QEMU_CAPS_CHARDEV
qemu: command: support -chardev for platform devices
qemu: Rename SupportsChardev to IsPlatformDevice
src/qemu/qemu_capabilities.c | 46 +---
src/qemu/qemu_capabilities.h | 6 +-
src/qemu/qemu_command.c | 243 ++++++---------------
src/qemu/qemu_process.c | 9 +-
tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 -
.../caps_2.6.0-gicv2.aarch64.xml | 1 -
.../caps_2.6.0-gicv3.aarch64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 1 -
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 -
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 -
tests/qemucapabilitiesdata/caps_2.9.50.s390x.xml | 1 -
tests/qemuhelptest.c | 5 -
.../qemuxml2argv-aarch64-aavmf-virtio-mmio.args | 4 +-
.../qemuxml2argv-aarch64-acpi-uefi.args | 4 +-
.../qemuxml2argv-aarch64-cpu-passthrough.args | 4 +-
.../qemuxml2argv-aarch64-gic-host.args | 4 +-
.../qemuxml2argv-aarch64-gic-none-tcg.args | 4 +-
.../qemuxml2argv-aarch64-gic-v2.args | 4 +-
.../qemuxml2argv-aarch64-gic-v3.args | 4 +-
.../qemuxml2argv-aarch64-kvm-32-on-64.args | 7 +-
.../qemuxml2argv-aarch64-noacpi-nouefi.args | 4 +-
.../qemuxml2argv-aarch64-noacpi-uefi.args | 4 +-
.../qemuxml2argv-aarch64-pci-serial.args | 26 +++
.../qemuxml2argv-aarch64-pci-serial.xml | 17 ++
...muxml2argv-aarch64-usb-controller-nec-xhci.args | 4 +-
...uxml2argv-aarch64-usb-controller-qemu-xhci.args | 4 +-
.../qemuxml2argv-aarch64-video-virtio-gpu-pci.args | 4 +-
...l2argv-aarch64-virt-2.6-virtio-pci-default.args | 7 +-
.../qemuxml2argv-aarch64-virt-default-nic.args | 5 +-
.../qemuxml2argv-aarch64-virt-virtio.args | 7 +-
.../qemuxml2argv-aarch64-virtio-pci-default.args | 7 +-
...l2argv-aarch64-virtio-pci-manual-addresses.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-acpi-table.args | 4 +-
.../qemuxml2argv-arm-vexpressa9-basic.args | 7 +-
.../qemuxml2argv-arm-vexpressa9-nodevs.args | 4 +-
.../qemuxml2argv-arm-vexpressa9-virtio.args | 7 +-
.../qemuxml2argv-arm-virt-virtio.args | 7 +-
tests/qemuxml2argvdata/qemuxml2argv-autoindex.args | 4 +-
.../qemuxml2argv-balloon-ccw-deflate.args | 4 +-
.../qemuxml2argv-balloon-device-auto.args | 4 +-
.../qemuxml2argv-balloon-device-deflate-off.args | 4 +-
.../qemuxml2argv-balloon-device-deflate.args | 4 +-
.../qemuxml2argv-balloon-device-period.args | 4 +-
.../qemuxml2argv-balloon-device.args | 4 +-
.../qemuxml2argv-balloon-mmio-deflate.args | 4 +-
.../qemuxml2argv-bios-nvram-secure.args | 5 +-
.../qemuxml2argv-bios-nvram-secure.xml | 6 -
.../qemuxml2argvdata/qemuxml2argv-bios-nvram.args | 5 +-
tests/qemuxml2argvdata/qemuxml2argv-bios-nvram.xml | 6 -
tests/qemuxml2argvdata/qemuxml2argv-bios.args | 7 +-
.../qemuxml2argv-blkdeviotune-group-num.args | 4 +-
.../qemuxml2argv-blkdeviotune-max-length.args | 4 +-
.../qemuxml2argv-blkdeviotune-max.args | 4 +-
.../qemuxml2argv-blkdeviotune.args | 4 +-
.../qemuxml2argv-blkiotune-device.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-blkiotune.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-boot-cdrom.args | 4 +-
.../qemuxml2argv-boot-complex-bootindex.args | 4 +-
.../qemuxml2argv-boot-complex.args | 4 +-
.../qemuxml2argv-boot-floppy-q35.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-boot-floppy.args | 4 +-
...xml2argv-boot-menu-disable-drive-bootindex.args | 4 +-
.../qemuxml2argv-boot-menu-disable-drive.args | 4 +-
.../qemuxml2argv-boot-menu-disable.args | 4 +-
.../qemuxml2argv-boot-menu-enable-bootindex.args | 4 +-
...qemuxml2argv-boot-menu-enable-with-timeout.args | 4 +-
.../qemuxml2argv-boot-menu-enable.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-boot-multi.args | 4 +-
.../qemuxml2argv-boot-network.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-boot-order.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-boot-strict.args | 4 +-
.../qemuxml2argv-bootindex-floppy-q35.args | 4 +-
.../qemuxml2argv-channel-spicevmc-old.args | 4 +-
.../qemuxml2argv-channel-spicevmc.args | 4 +-
.../qemuxml2argv-clock-catchup.args | 4 +-
.../qemuxml2argv-clock-france.args | 4 +-
.../qemuxml2argv-clock-hpet-off.args | 4 +-
...muxml2argv-clock-localtime-basis-localtime.args | 4 +-
.../qemuxml2argv-clock-localtime.args | 4 +-
.../qemuxml2argv-clock-timer-hyperv-rtc.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args | 4 +-
.../qemuxml2argv-clock-variable.args | 4 +-
.../qemuxml2argv-console-compat-auto.args | 7 +-
.../qemuxml2argv-console-compat.args | 7 +-
.../qemuxml2argv-cpu-Haswell-noTSX.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-Haswell.args | 4 +-
.../qemuxml2argv-cpu-Haswell2.args | 4 +-
.../qemuxml2argv-cpu-Haswell3.args | 4 +-
.../qemuxml2argv-cpu-cache-disable.args | 4 +-
.../qemuxml2argv-cpu-cache-disable2.args | 4 +-
.../qemuxml2argv-cpu-cache-disable3.args | 4 +-
.../qemuxml2argv-cpu-cache-emulate-l3.args | 4 +-
.../qemuxml2argv-cpu-cache-passthrough.args | 4 +-
.../qemuxml2argv-cpu-cache-passthrough2.args | 4 +-
.../qemuxml2argv-cpu-check-default-none.args | 4 +-
.../qemuxml2argv-cpu-check-default-none2.args | 4 +-
.../qemuxml2argv-cpu-check-default-partial.args | 4 +-
.../qemuxml2argv-cpu-check-default-partial2.args | 4 +-
.../qemuxml2argv-cpu-check-none.args | 4 +-
.../qemuxml2argv-cpu-eoi-disabled.args | 4 +-
.../qemuxml2argv-cpu-eoi-enabled.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-exact1.args | 4 +-
.../qemuxml2argv-cpu-exact2-nofallback.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-exact2.args | 4 +-
.../qemuxml2argv-cpu-fallback.args | 4 +-
.../qemuxml2argv-cpu-host-kvmclock.args | 4 +-
.../qemuxml2argv-cpu-host-model-cmt.args | 4 +-
.../qemuxml2argv-cpu-host-model-fallback.args | 4 +-
.../qemuxml2argv-cpu-host-model-vendor.args | 4 +-
.../qemuxml2argv-cpu-host-model.args | 4 +-
...qemuxml2argv-cpu-host-passthrough-features.args | 4 +-
.../qemuxml2argv-cpu-host-passthrough.args | 4 +-
.../qemuxml2argv-cpu-hotplug-startup.args | 4 +-
.../qemuxml2argv-cpu-kvmclock.args | 4 +-
.../qemuxml2argv-cpu-minimum1.args | 4 +-
.../qemuxml2argv-cpu-minimum2.args | 4 +-
.../qemuxml2argv-cpu-numa-disjoint.args | 4 +-
.../qemuxml2argv-cpu-numa-memshared.args | 4 +-
.../qemuxml2argv-cpu-numa-no-memory-element.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa1.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-cpu-numa2.args | 4 +-
.../qemuxml2argv-cpu-s390-features.args | 4 +-
.../qemuxml2argv-cpu-s390-zEC12.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-strict1.args | 4 +-
.../qemuxml2argv-cpu-topology1.args | 4 +-
.../qemuxml2argv-cpu-topology2.args | 4 +-
.../qemuxml2argv-cpu-topology3.args | 4 +-
.../qemuxml2argv-cpu-tsc-frequency.args | 4 +-
.../qemuxml2argv-cputune-numatune.args | 4 +-
.../qemuxml2argv-cputune-zero-shares.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-cputune.args | 4 +-
.../qemuxml2argv-debug-threads.args | 4 +-
.../qemuxml2argv-default-kvm-host-arch.args | 4 +-
.../qemuxml2argv-default-qemu-host-arch.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args | 4 +-
.../qemuxml2argv-disk-blockio.args | 4 +-
.../qemuxml2argv-disk-cdrom-empty.args | 4 +-
.../qemuxml2argv-disk-cdrom-network-ftp.args | 4 +-
.../qemuxml2argv-disk-cdrom-network-ftps.args | 4 +-
.../qemuxml2argv-disk-cdrom-network-http.args | 4 +-
.../qemuxml2argv-disk-cdrom-network-https.args | 4 +-
.../qemuxml2argv-disk-cdrom-network-tftp.args | 4 +-
...qemuxml2argv-disk-cdrom-tray-no-device-cap.args | 4 +-
.../qemuxml2argv-disk-cdrom-tray.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-disk-cdrom.args | 4 +-
.../qemuxml2argv-disk-copy_on_read.args | 5 +-
.../qemuxml2argv-disk-copy_on_read.xml | 6 -
.../qemuxml2argv-disk-drive-boot-cdrom.args | 4 +-
.../qemuxml2argv-disk-drive-boot-disk.args | 4 +-
.../qemuxml2argv-disk-drive-cache-directsync.args | 4 +-
.../qemuxml2argv-disk-drive-cache-unsafe.args | 4 +-
.../qemuxml2argv-disk-drive-cache-v2-none.args | 4 +-
.../qemuxml2argv-disk-drive-cache-v2-wb.args | 4 +-
.../qemuxml2argv-disk-drive-cache-v2-wt.args | 4 +-
.../qemuxml2argv-disk-drive-copy-on-read.args | 4 +-
.../qemuxml2argv-disk-drive-detect-zeroes.args | 4 +-
.../qemuxml2argv-disk-drive-discard.args | 4 +-
...uxml2argv-disk-drive-error-policy-enospace.args | 4 +-
.../qemuxml2argv-disk-drive-error-policy-stop.args | 4 +-
...gv-disk-drive-error-policy-wreport-rignore.args | 4 +-
.../qemuxml2argv-disk-drive-fmt-qcow.args | 4 +-
.../qemuxml2argv-disk-drive-network-gluster.args | 4 +-
...qemuxml2argv-disk-drive-network-iscsi-auth.args | 4 +-
.../qemuxml2argv-disk-drive-network-iscsi-lun.args | 4 +-
.../qemuxml2argv-disk-drive-network-iscsi.args | 4 +-
...qemuxml2argv-disk-drive-network-nbd-export.args | 4 +-
...ml2argv-disk-drive-network-nbd-ipv6-export.args | 4 +-
.../qemuxml2argv-disk-drive-network-nbd-ipv6.args | 4 +-
.../qemuxml2argv-disk-drive-network-nbd-unix.args | 4 +-
.../qemuxml2argv-disk-drive-network-nbd.args | 4 +-
...muxml2argv-disk-drive-network-rbd-auth-AES.args | 4 +-
.../qemuxml2argv-disk-drive-network-rbd-auth.args | 4 +-
.../qemuxml2argv-disk-drive-network-rbd-ipv6.args | 4 +-
.../qemuxml2argv-disk-drive-network-rbd.args | 4 +-
.../qemuxml2argv-disk-drive-network-sheepdog.args | 4 +-
.../qemuxml2argv-disk-drive-no-boot.args | 4 +-
.../qemuxml2argv-disk-drive-readonly-disk.args | 4 +-
...qemuxml2argv-disk-drive-readonly-no-device.args | 4 +-
.../qemuxml2argv-disk-drive-shared.args | 4 +-
...emuxml2argv-disk-floppy-tray-no-device-cap.args | 4 +-
.../qemuxml2argv-disk-floppy-tray.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-disk-floppy.args | 4 +-
.../qemuxml2argv-disk-geometry.args | 4 +-
.../qemuxml2argv-disk-ide-drive-split.args | 4 +-
.../qemuxml2argv-disk-ide-wwn.args | 4 +-
.../qemuxml2argv-disk-ioeventfd.args | 5 +-
.../qemuxml2argv-disk-ioeventfd.xml | 6 -
.../qemuxml2argvdata/qemuxml2argv-disk-iscsi.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-many.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-disk-order.args | 4 +-
.../qemuxml2argv-disk-sata-device.args | 4 +-
.../qemuxml2argv-disk-scsi-device-auto.args | 4 +-
.../qemuxml2argv-disk-scsi-device.args | 4 +-
.../qemuxml2argv-disk-scsi-disk-split.args | 4 +-
.../qemuxml2argv-disk-scsi-disk-vpd.args | 4 +-
.../qemuxml2argv-disk-scsi-disk-wwn.args | 4 +-
.../qemuxml2argv-disk-scsi-lun-passthrough.args | 4 +-
.../qemuxml2argv-disk-scsi-megasas.args | 4 +-
.../qemuxml2argv-disk-scsi-mptsas1068.args | 4 +-
.../qemuxml2argv-disk-scsi-virtio-scsi.args | 4 +-
.../qemuxml2argv-disk-scsi-vscsi.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-disk-serial.args | 4 +-
.../qemuxml2argv-disk-snapshot.args | 4 +-
.../qemuxml2argv-disk-source-pool-mode.args | 4 +-
.../qemuxml2argv-disk-source-pool.args | 4 +-
.../qemuxml2argv-disk-usb-device-removable.args | 4 +-
.../qemuxml2argv-disk-usb-device.args | 4 +-
.../qemuxml2argv-disk-virtio-ccw-many.args | 4 +-
.../qemuxml2argv-disk-virtio-ccw.args | 4 +-
.../qemuxml2argv-disk-virtio-s390.args | 4 +-
.../qemuxml2argv-disk-virtio-scsi-ccw.args | 4 +-
.../qemuxml2argv-disk-virtio-scsi-cmd_per_lun.args | 4 +-
.../qemuxml2argv-disk-virtio-scsi-ioeventfd.args | 4 +-
.../qemuxml2argv-disk-virtio-scsi-max_sectors.args | 4 +-
.../qemuxml2argv-disk-virtio-scsi-num_queues.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-disk-virtio.args | 4 +-
.../qemuxml2argv-encrypted-disk-usage.args | 4 +-
.../qemuxml2argv-encrypted-disk.args | 4 +-
.../qemuxml2argv-eoi-disabled.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-eoi-enabled.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-event_idx.args | 5 +-
tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml | 6 -
.../qemuxml2argv-fd-memory-no-numa-topology.args | 4 +-
.../qemuxml2argv-fd-memory-numa-topology.args | 4 +-
.../qemuxml2argv-fd-memory-numa-topology2.args | 4 +-
.../qemuxml2argv-fd-memory-numa-topology3.args | 4 +-
.../qemuxml2argv-fips-enabled.args | 4 +-
.../qemuxml2argv-floppy-drive-fat.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-fs9p-ccw.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-fs9p.args | 4 +-
.../qemuxml2argv-graphics-sdl-fullscreen.args | 4 +-
.../qemuxml2argv-graphics-sdl.args | 4 +-
...emuxml2argv-graphics-spice-agent-file-xfer.args | 4 +-
.../qemuxml2argv-graphics-spice-agentmouse.args | 4 +-
...emuxml2argv-graphics-spice-auto-socket-cfg.args | 4 +-
.../qemuxml2argv-graphics-spice-auto-socket.args | 4 +-
.../qemuxml2argv-graphics-spice-compression.args | 4 +-
.../qemuxml2argv-graphics-spice-no-args.args | 4 +-
.../qemuxml2argv-graphics-spice-qxl-vga.args | 4 +-
.../qemuxml2argv-graphics-spice-sasl.args | 4 +-
.../qemuxml2argv-graphics-spice-socket.args | 4 +-
.../qemuxml2argv-graphics-spice-timeout.args | 5 +-
.../qemuxml2argv-graphics-spice-timeout.xml | 6 -
.../qemuxml2argv-graphics-spice.args | 4 +-
.../qemuxml2argv-graphics-vnc-auto-socket-cfg.args | 4 +-
.../qemuxml2argv-graphics-vnc-auto-socket.args | 4 +-
.../qemuxml2argv-graphics-vnc-no-listen-attr.args | 4 +-
.../qemuxml2argv-graphics-vnc-none.args | 4 +-
.../qemuxml2argv-graphics-vnc-policy.args | 4 +-
...2argv-graphics-vnc-remove-generated-socket.args | 4 +-
.../qemuxml2argv-graphics-vnc-sasl.args | 4 +-
.../qemuxml2argv-graphics-vnc-socket.args | 4 +-
.../qemuxml2argv-graphics-vnc-tls.args | 4 +-
.../qemuxml2argv-graphics-vnc-websocket.args | 4 +-
.../qemuxml2argv-graphics-vnc.args | 4 +-
.../qemuxml2argv-hostdev-mdev-precreated.args | 4 +-
.../qemuxml2argv-hostdev-pci-address-device.args | 4 +-
.../qemuxml2argv-hostdev-pci-address.args | 4 +-
.../qemuxml2argv-hostdev-scsi-lsi-iscsi-auth.args | 4 +-
.../qemuxml2argv-hostdev-scsi-lsi-iscsi.args | 4 +-
.../qemuxml2argv-hostdev-scsi-lsi.args | 4 +-
.../qemuxml2argv-hostdev-scsi-readonly.args | 4 +-
.../qemuxml2argv-hostdev-scsi-vhost-scsi-ccw.args | 4 +-
.../qemuxml2argv-hostdev-scsi-vhost-scsi-pci.args | 4 +-
...emuxml2argv-hostdev-scsi-virtio-iscsi-auth.args | 4 +-
.../qemuxml2argv-hostdev-scsi-virtio-iscsi.args | 4 +-
.../qemuxml2argv-hostdev-scsi-virtio-scsi.args | 4 +-
...muxml2argv-hostdev-usb-address-device-boot.args | 4 +-
.../qemuxml2argv-hostdev-usb-address-device.args | 4 +-
.../qemuxml2argv-hostdev-usb-address.args | 4 +-
.../qemuxml2argv-hostdev-vfio-multidomain.args | 4 +-
.../qemuxml2argv-hostdev-vfio.args | 4 +-
.../qemuxml2argv-hotplug-base.args | 4 +-
.../qemuxml2argv-hugepages-memaccess.args | 4 +-
.../qemuxml2argv-hugepages-memaccess2.args | 4 +-
.../qemuxml2argv-hugepages-numa.args | 5 +-
.../qemuxml2argv-hugepages-numa.xml | 6 -
.../qemuxml2argv-hugepages-pages.args | 4 +-
.../qemuxml2argv-hugepages-pages2.args | 5 +-
.../qemuxml2argv-hugepages-pages3.args | 5 +-
.../qemuxml2argv-hugepages-pages5.args | 5 +-
.../qemuxml2argv-hugepages-pages6.args | 5 +-
.../qemuxml2argv-hugepages-shared.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-hugepages.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-hyperv-off.args | 4 +-
.../qemuxml2argv-hyperv-panic.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-hyperv.args | 4 +-
.../qemuxml2argv-input-usbmouse-addr.args | 4 +-
.../qemuxml2argv-input-usbmouse.args | 4 +-
.../qemuxml2argv-input-usbtablet.args | 4 +-
.../qemuxml2argv-intel-iommu-caching-mode.args | 4 +-
.../qemuxml2argv-intel-iommu-device-iotlb.args | 4 +-
.../qemuxml2argv-intel-iommu-eim.args | 4 +-
.../qemuxml2argv-intel-iommu-ioapic.args | 4 +-
.../qemuxml2argv-intel-iommu-machine.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-intel-iommu.args | 4 +-
.../qemuxml2argv-iothreads-disk-virtio-ccw.args | 4 +-
.../qemuxml2argv-iothreads-disk.args | 4 +-
.../qemuxml2argv-iothreads-ids-partial.args | 4 +-
.../qemuxml2argv-iothreads-ids.args | 4 +-
.../qemuxml2argv-iothreads-virtio-scsi-ccw.args | 4 +-
.../qemuxml2argv-iothreads-virtio-scsi-pci.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-iothreads.args | 4 +-
.../qemuxml2argv-kvm-features-off.args | 4 +-
.../qemuxml2argv-kvm-features.args | 4 +-
.../qemuxml2argv-kvm-pit-delay.args | 4 +-
.../qemuxml2argv-kvm-pit-discard.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-kvm.args | 4 +-
.../qemuxml2argv-kvmclock+eoi-disabled.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-kvmclock.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-luks-disks.args | 4 +-
.../qemuxml2argv-machine-aeskeywrap-off-cap.args | 4 +-
.../qemuxml2argv-machine-aeskeywrap-off-caps.args | 4 +-
.../qemuxml2argv-machine-aeskeywrap-on-cap.args | 4 +-
.../qemuxml2argv-machine-aeskeywrap-on-caps.args | 4 +-
.../qemuxml2argv-machine-aliases1.args | 4 +-
.../qemuxml2argv-machine-aliases2.args | 4 +-
.../qemuxml2argv-machine-core-cfg-off.args | 4 +-
.../qemuxml2argv-machine-core-off.args | 4 +-
.../qemuxml2argv-machine-core-on.args | 4 +-
.../qemuxml2argv-machine-deakeywrap-off-cap.args | 4 +-
.../qemuxml2argv-machine-deakeywrap-off-caps.args | 4 +-
.../qemuxml2argv-machine-deakeywrap-on-cap.args | 4 +-
.../qemuxml2argv-machine-deakeywrap-on-caps.args | 4 +-
.../qemuxml2argv-machine-keywrap-none-caps.args | 4 +-
.../qemuxml2argv-machine-keywrap-none.args | 4 +-
...-machine-loadparm-multiple-disks-nets-s390.args | 4 +-
.../qemuxml2argv-machine-loadparm-net-s390.args | 4 +-
.../qemuxml2argv-machine-loadparm-s390.args | 4 +-
.../qemuxml2argv-machine-smm-opt.args | 4 +-
.../qemuxml2argv-machine-usb-opt.args | 4 +-
.../qemuxml2argv-machine-vmport-opt.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-master-key.args | 4 +-
.../qemuxml2argv-memory-hotplug-dimm-addr.args | 4 +-
.../qemuxml2argv-memory-hotplug-dimm.args | 4 +-
.../qemuxml2argv-memory-hotplug-nvdimm-access.args | 4 +-
.../qemuxml2argv-memory-hotplug-nvdimm-label.args | 4 +-
.../qemuxml2argv-memory-hotplug-nvdimm.args | 4 +-
.../qemuxml2argv-memory-hotplug-ppc64-nonuma.args | 5 +-
.../qemuxml2argv-memory-hotplug-ppc64-nonuma.xml | 6 -
.../qemuxml2argv-memory-hotplug.args | 4 +-
.../qemuxml2argv-memtune-unlimited.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-memtune.args | 4 +-
.../qemuxml2argv-migrate-numa-unaligned.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-migrate.args | 4 +-
.../qemuxml2argv-minimal-msg-timestamp.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-minimal.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.args | 4 +-
.../qemuxml2argv-misc-disable-s3.args | 4 +-
.../qemuxml2argv-misc-disable-suspends.args | 4 +-
.../qemuxml2argv-misc-enable-s4.args | 4 +-
.../qemuxml2argv-misc-no-reboot.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-mlock-off.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-mlock-on.args | 4 +-
.../qemuxml2argv-mlock-unsupported.args | 4 +-
.../qemuxml2argv-multifunction-pci-device.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-net-client.args | 4 +-
.../qemuxml2argv-net-eth-hostip.args | 4 +-
.../qemuxml2argv-net-eth-ifname.args | 4 +-
.../qemuxml2argv-net-eth-names.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-net-eth.args | 4 +-
.../qemuxml2argv-net-hostdev-multidomain.args | 4 +-
.../qemuxml2argv-net-hostdev-vfio-multidomain.args | 4 +-
.../qemuxml2argv-net-hostdev-vfio.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-net-hostdev.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-net-mcast.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-net-server.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-net-udp.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-net-user.args | 4 +-
.../qemuxml2argv-net-vhostuser-multiq.args | 4 +-
.../qemuxml2argv-net-vhostuser.args | 4 +-
.../qemuxml2argv-net-virtio-ccw.args | 4 +-
.../qemuxml2argv-net-virtio-device.args | 4 +-
.../qemuxml2argv-net-virtio-disable-offloads.args | 4 +-
.../qemuxml2argv-net-virtio-netdev.args | 4 +-
.../qemuxml2argv-net-virtio-rxqueuesize.args | 4 +-
.../qemuxml2argv-net-virtio-s390.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-net-virtio.args | 4 +-
.../qemuxml2argv-no-kvm-pit-device.args | 4 +-
.../qemuxml2argv-nographics-display.args | 4 +-
.../qemuxml2argv-nographics-vga.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-nographics.args | 4 +-
.../qemuxml2argv-nosharepages.args | 4 +-
...qemuxml2argv-numad-auto-memory-vcpu-cpuset.args | 4 +-
...d-auto-memory-vcpu-no-cpuset-and-placement.args | 4 +-
...muxml2argv-numad-auto-vcpu-static-numatune.args | 4 +-
...qemuxml2argv-numad-static-memory-auto-vcpu.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-numad.args | 4 +-
...qemuxml2argv-numatune-auto-nodeset-invalid.args | 4 +-
.../qemuxml2argv-numatune-auto-prefer.args | 4 +-
.../qemuxml2argv-numatune-memnode-no-memory.args | 4 +-
.../qemuxml2argv-numatune-memnode.args | 4 +-
.../qemuxml2argv-numatune-memory.args | 4 +-
.../qemuxml2argv-panic-double.args | 4 +-
.../qemuxml2argv-panic-no-address.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-panic.args | 4 +-
.../qemuxml2argv-parallel-tcp.args | 22 --
.../qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml | 35 ---
.../qemuxml2argv-pci-autoadd-addr.args | 4 +-
.../qemuxml2argv-pci-autoadd-idx.args | 4 +-
.../qemuxml2argv-pci-autofill-addr.args | 4 +-
.../qemuxml2argv-pci-bridge-many-disks.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-pci-bridge.args | 4 +-
.../qemuxml2argv-pci-expander-bus.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-pci-many.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-pci-rom.args | 4 +-
.../qemuxml2argv-pcie-expander-bus.args | 5 +-
.../qemuxml2argv-pcie-root-port-model-generic.args | 4 +-
.../qemuxml2argv-pcie-root-port-model-ioh3420.args | 4 +-
.../qemuxml2argv-pcie-root-port.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-pcie-root.args | 4 +-
.../qemuxml2argv-pcie-switch-downstream-port.args | 4 +-
.../qemuxml2argv-pcie-switch-upstream-port.args | 4 +-
.../qemuxml2argv-pcihole64-q35.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-pcihole64.args | 4 +-
.../qemuxml2argv-pmu-feature-off.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-pmu-feature.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args | 7 +-
.../qemuxml2argv-ppc64-usb-controller-legacy.args | 4 +-
...emuxml2argv-ppc64-usb-controller-qemu-xhci.args | 4 +-
.../qemuxml2argv-ppc64-usb-controller.args | 4 +-
.../qemuxml2argv-ppce500-serial.args | 3 +-
.../qemuxml2argv-pseries-nvram.args | 4 +-
.../qemuxml2argv-pv-spinlock-disabled.args | 4 +-
.../qemuxml2argv-pv-spinlock-enabled.args | 4 +-
.../qemuxml2argv-q35-acpi-nouefi.args | 4 +-
.../qemuxml2argv-q35-acpi-uefi.args | 4 +-
.../qemuxml2argv-q35-default-devices-only.args | 4 +-
.../qemuxml2argv-q35-multifunction.args | 4 +-
.../qemuxml2argv-q35-noacpi-nouefi.args | 4 +-
.../qemuxml2argv-q35-pci-force-address.args | 4 +-
.../qemuxml2argv-q35-pcie-autoadd.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-q35-pcie.args | 4 +-
.../qemuxml2argv-q35-pm-disable-fallback.args | 4 +-
.../qemuxml2argv-q35-pm-disable.args | 4 +-
.../qemuxml2argv-q35-usb2-multi.args | 4 +-
.../qemuxml2argv-q35-usb2-reorder.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-q35-usb2.args | 4 +-
.../qemuxml2argv-q35-virt-manager-basic.args | 7 +-
.../qemuxml2argv-q35-virtio-pci.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-q35.args | 4 +-
.../qemuxml2argv-qemu-ns-commandline-ns0.args | 4 +-
.../qemuxml2argv-qemu-ns-commandline-ns1.args | 4 +-
.../qemuxml2argv-qemu-ns-commandline.args | 4 +-
...emuxml2argv-qemu-ns-domain-commandline-ns0.args | 4 +-
.../qemuxml2argv-qemu-ns-domain-commandline.args | 4 +-
.../qemuxml2argv-qemu-ns-domain-ns0.args | 4 +-
.../qemuxml2argv-qemu-ns-no-env.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.args | 4 +-
.../qemuxml2argv-reboot-timeout-disabled.args | 4 +-
.../qemuxml2argv-reboot-timeout-enabled.args | 4 +-
.../qemuxml2argv-restore-v2-fd.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-restore-v2.args | 4 +-
.../qemuxml2argv-seclabel-dac-none.args | 4 +-
.../qemuxml2argv-seclabel-dynamic-baselabel.args | 4 +-
.../qemuxml2argv-seclabel-dynamic-labelskip.args | 4 +-
.../qemuxml2argv-seclabel-dynamic-override.args | 4 +-
.../qemuxml2argv-seclabel-dynamic-relabel.args | 4 +-
.../qemuxml2argv-seclabel-dynamic.args | 4 +-
.../qemuxml2argv-seclabel-none.args | 4 +-
.../qemuxml2argv-seclabel-static-labelskip.args | 4 +-
.../qemuxml2argv-seclabel-static-relabel.args | 4 +-
.../qemuxml2argv-seclabel-static.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-serial-dev.args | 22 --
tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml | 38 ----
.../qemuxml2argvdata/qemuxml2argv-serial-file.args | 22 --
.../qemuxml2argvdata/qemuxml2argv-serial-file.xml | 38 ----
.../qemuxml2argvdata/qemuxml2argv-serial-many.args | 23 --
.../qemuxml2argvdata/qemuxml2argv-serial-many.xml | 40 ----
.../qemuxml2argvdata/qemuxml2argv-serial-pty.args | 4 +-
.../qemuxml2argv-serial-spiceport-nospice.args | 4 +-
.../qemuxml2argv-serial-tcp-telnet.args | 22 --
.../qemuxml2argv-serial-tcp-telnet.xml | 40 ----
.../qemuxml2argvdata/qemuxml2argv-serial-tcp.args | 22 --
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml | 40 ----
.../qemuxml2argvdata/qemuxml2argv-serial-udp.args | 23 --
tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml | 44 ----
.../qemuxml2argvdata/qemuxml2argv-serial-unix.args | 22 --
.../qemuxml2argvdata/qemuxml2argv-serial-unix.xml | 38 ----
tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args | 22 --
tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml | 36 ---
.../qemuxml2argv-shmem-plain-doorbell.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-shmem.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-smbios.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-smp.args | 4 +-
.../qemuxml2argv-sound-device.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-sound.args | 4 +-
.../qemuxml2argv-tpm-passthrough.args | 4 +-
.../qemuxml2argv-usb-controller-default-q35.args | 4 +-
.../qemuxml2argv-usb-controller-explicit-q35.args | 4 +-
.../qemuxml2argv-usb-controller-qemu-xhci.args | 4 +-
.../qemuxml2argv-vcpu-placement-static.args | 4 +-
.../qemuxml2argv-video-device-pciaddr-default.args | 4 +-
.../qemuxml2argv-video-qxl-device-vgamem.args | 4 +-
.../qemuxml2argv-video-qxl-device.args | 4 +-
.../qemuxml2argv-video-qxl-heads.args | 4 +-
.../qemuxml2argv-video-qxl-nodevice.args | 4 +-
.../qemuxml2argv-video-qxl-noheads.args | 4 +-
.../qemuxml2argv-video-qxl-sec-device-vgamem.args | 4 +-
.../qemuxml2argv-video-qxl-sec-device.args | 4 +-
.../qemuxml2argv-video-vga-device-vgamem.args | 4 +-
.../qemuxml2argv-video-vga-device.args | 4 +-
.../qemuxml2argv-video-vga-nodevice.args | 4 +-
.../qemuxml2argv-video-vga-qxl-heads.args | 4 +-
.../qemuxml2argv-video-virtio-gpu-device.args | 4 +-
.../qemuxml2argv-video-virtio-gpu-secondary.args | 4 +-
.../qemuxml2argv-video-virtio-gpu-spice-gl.args | 4 +-
.../qemuxml2argv-video-virtio-gpu-virgl.args | 4 +-
.../qemuxml2argv-video-virtio-vga.args | 4 +-
.../qemuxml2argv-virtio-input-passthrough.args | 4 +-
.../qemuxml2argv-virtio-input.args | 4 +-
.../qemuxml2argvdata/qemuxml2argv-virtio-lun.args | 5 +-
tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml | 6 -
.../qemuxml2argv-virtio-options.args | 4 +-
.../qemuxml2argv-virtio-rng-default.args | 4 +-
.../qemuxml2argv-virtio-rng-egd.args | 4 +-
.../qemuxml2argv-virtio-rng-multiple.args | 4 +-
.../qemuxml2argv-virtio-rng-random.args | 4 +-
.../qemuxml2argv-watchdog-device.args | 4 +-
.../qemuxml2argv-watchdog-dump.args | 4 +-
.../qemuxml2argv-watchdog-injectnmi.args | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-watchdog.args | 4 +-
tests/qemuxml2argvtest.c | 200 ++++++++---------
.../qemuxml2xmlout-bios-nvram.xml | 6 -
.../qemuxml2xmlout-disk-copy_on_read.xml | 6 -
.../qemuxml2xmlout-event_idx.xml | 6 -
.../qemuxml2xmlout-graphics-spice-timeout.xml | 6 -
.../qemuxml2xmlout-virtio-lun.xml | 6 -
tests/qemuxml2xmltest.c | 10 -
542 files changed, 1683 insertions(+), 1509 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-pci-serial.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-pci-serial.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-dev.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-file.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-many.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-udp.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-unix.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-vc.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
--
2.13.0
7 years, 4 months
[libvirt] [PATCH v2] qemu: Check for existence of provided *_tls_x509_cert_dir
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1458630
Introduce virQEMUDriverConfigSetCertDir which will handle reading the
qemu.conf config file specific setting for default, vnc, spice, chardev,
and migrate. If a setting is provided, then validate the existence of the
directory and overwrite the default set by virQEMUDriverConfigNew.
Update the qemu.conf description for default to describe the consequences
if the default directory path does not exist and as well as the descriptions
for each of the *_tls_x509_cert_dir entries.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
v1: https://www.redhat.com/archives/libvir-list/2017-June/msg01278.html
- Dropped the former 1/2 patch
- Alter the logic of virQEMUDriverConfigSetCertDir to fail instead of
VIR_INFO if an uncommented entry for one of the *_tls_x509_cert_dir
has a path that does not exist. This will cause a libvirtd startup
failure as opposed to the previous logic which would have failed only
when a domain using TLS was started.
- Alter the description for each of the values to more accurately describe
what happens.
src/qemu/qemu.conf | 29 ++++++++++++++++++++---------
src/qemu/qemu_conf.c | 38 +++++++++++++++++++++++++++++++++-----
2 files changed, 53 insertions(+), 14 deletions(-)
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index e6c0832..b0ccffb 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -3,7 +3,7 @@
# defaults are used.
# Use of TLS requires that x509 certificates be issued. The default is
-# to keep them in /etc/pki/qemu. This directory must contain
+# to keep them in /etc/pki/qemu. This directory must exist and contain:
#
# ca-cert.pem - the CA master certificate
# server-cert.pem - the server certificate signed with ca-cert.pem
@@ -13,6 +13,12 @@
#
# dh-params.pem - the DH params configuration file
#
+# If the directory does not exist or does not contain the necessary files,
+# QEMU domains will fail to start if they are configured to use TLS.
+#
+# In order to overwrite the default path alter the following. If the provided
+# path does not exist, then startup will fail.
+#
#default_tls_x509_cert_dir = "/etc/pki/qemu"
@@ -79,8 +85,9 @@
# In order to override the default TLS certificate location for
# vnc certificates, supply a valid path to the certificate directory.
-# If the provided path does not exist then the default_tls_x509_cert_dir
-# path will be used.
+# If the default listed here does not exist, then the default /etc/pki/qemu
+# is used. If uncommented and the provided path does not exist, then startup
+# will fail.
#
#vnc_tls_x509_cert_dir = "/etc/pki/libvirt-vnc"
@@ -164,8 +171,9 @@
# In order to override the default TLS certificate location for
# spice certificates, supply a valid path to the certificate directory.
-# If the provided path does not exist then the default_tls_x509_cert_dir
-# path will be used.
+# If the default listed here does not exist, then the default /etc/pki/qemu
+# is used. If uncommented and the provided path does not exist, then startup
+# will fail.
#
#spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice"
@@ -216,8 +224,9 @@
# In order to override the default TLS certificate location for character
# device TCP certificates, supply a valid path to the certificate directory.
-# If the provided path does not exist then the default_tls_x509_cert_dir
-# path will be used.
+# If the default listed here does not exist, then the default /etc/pki/qemu
+# is used. If uncommented and the provided path does not exist, then startup
+# will fail.
#
#chardev_tls_x509_cert_dir = "/etc/pki/libvirt-chardev"
@@ -252,8 +261,10 @@
# In order to override the default TLS certificate location for migration
# certificates, supply a valid path to the certificate directory. If the
-# provided path does not exist then the default_tls_x509_cert_dir path
-# will be used. Once/if a default certificate is enabled/defined, migration
+# default listed here does not exist, then the default /etc/pki/qemu is used.
+# If uncommented and the provided path does not exist, then startup will fail.
+#
+# Once/if a default certificate is enabled/defined, migration
# will then be able to use the certificate via migration API flags.
#
#migrate_tls_x509_cert_dir = "/etc/pki/libvirt-migrate"
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 73c33d6..4eb6f0c 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -440,6 +440,34 @@ virQEMUDriverConfigHugeTLBFSInit(virHugeTLBFSPtr hugetlbfs,
}
+static int
+virQEMUDriverConfigSetCertDir(virConfPtr conf,
+ const char *setting,
+ char **value)
+{
+ char *tlsCertDir = NULL;
+
+ if (virConfGetValueString(conf, setting, &tlsCertDir) < 0)
+ return -1;
+
+ if (!tlsCertDir)
+ return 0;
+
+ if (!virFileExists(tlsCertDir)) {
+ virReportError(VIR_ERR_CONF_SYNTAX,
+ _("directory '%s' does not exist for setting '%s'"),
+ tlsCertDir, setting);
+ VIR_FREE(tlsCertDir);
+ return -1;
+ } else {
+ VIR_FREE(*value);
+ VIR_STEAL_PTR(*value, tlsCertDir);
+ }
+
+ return 0;
+}
+
+
int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
const char *filename,
bool privileged)
@@ -467,7 +495,7 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
if (!(conf = virConfReadFile(filename, 0)))
goto cleanup;
- if (virConfGetValueString(conf, "default_tls_x509_cert_dir", &cfg->defaultTLSx509certdir) < 0)
+ if (virQEMUDriverConfigSetCertDir(conf, "default_tls_x509_cert_dir", &cfg->defaultTLSx509certdir) < 0)
goto cleanup;
if (virConfGetValueBool(conf, "default_tls_x509_verify", &cfg->defaultTLSx509verify) < 0)
goto cleanup;
@@ -483,7 +511,7 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
goto cleanup;
if (rv == 0)
cfg->vncTLSx509verify = cfg->defaultTLSx509verify;
- if (virConfGetValueString(conf, "vnc_tls_x509_cert_dir", &cfg->vncTLSx509certdir) < 0)
+ if (virQEMUDriverConfigSetCertDir(conf, "vnc_tls_x509_cert_dir", &cfg->vncTLSx509certdir) < 0)
goto cleanup;
if (virConfGetValueString(conf, "vnc_listen", &cfg->vncListen) < 0)
goto cleanup;
@@ -521,7 +549,7 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
if (virConfGetValueBool(conf, "spice_tls", &cfg->spiceTLS) < 0)
goto cleanup;
- if (virConfGetValueString(conf, "spice_tls_x509_cert_dir", &cfg->spiceTLSx509certdir) < 0)
+ if (virQEMUDriverConfigSetCertDir(conf, "spice_tls_x509_cert_dir", &cfg->spiceTLSx509certdir) < 0)
goto cleanup;
if (virConfGetValueBool(conf, "spice_sasl", &cfg->spiceSASL) < 0)
goto cleanup;
@@ -541,8 +569,8 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
goto cleanup; \
if (rv == 0) \
cfg->val## TLSx509verify = cfg->defaultTLSx509verify; \
- if (virConfGetValueString(conf, #val "_tls_x509_cert_dir", \
- &cfg->val## TLSx509certdir) < 0) \
+ if (virQEMUDriverConfigSetCertDir(conf, #val "_tls_x509_cert_dir", \
+ &cfg->val## TLSx509certdir) < 0) \
goto cleanup; \
if (virConfGetValueString(conf, \
#val "_tls_x509_secret_uuid", \
--
2.9.4
7 years, 4 months
[libvirt] [PATCH v3 00/16] qemu: migration: show disks stats for nbd migration
by Nikolay Shirokovskiy
diff from v2:
============
1. Fix style issues.
2. Rework patch for fetching job info
(save logic to use temporary variable when drop vm lock)
3. Update disk stats when block jobs are canceled.
4. Adress a few more corner cases.
This patch series add disks stats to domain job info(stats) as
well as to migration completed event in case nbd scheme is used.
There is little nuisance with qcow2 disks (which is the main scenario
I guess) tied to the way qemu reports stats for this type of disks.
For example if we have 64G disk filled only to 1G then stats
start from 63G and will grow up to 64G on completion. The same way disk stats
will be reported by this patch.
I guess the better way to express the situation is to say we have 64G 'total',
and have 'processed' field grow from 0G to 1G, like in case of memory
stats. [1] is the example of completed memory stats of empty guest
domain, which show difference between processed and total.
There can be a workaround like getting initial blockjob offset position
as a zero but is is rather ugly and racy and like uses undocumented
behaviour.
[1] memory migration stats example
Memory processed: 3.307 MiB
Memory remaining: 0.000 B
Memory total: 1.032 GiB
The above is applied to qemu 2.6 at least.
Patches that were explicitly ACKed in previous review
(up to style issues) marked with A.
Nikolay Shirokovskiy (16):
qemu: drop code for VIR_DOMAIN_JOB_BOUNDED and timeRemaining
A qemu: introduce qemu domain job status
A qemu: introduce QEMU_DOMAIN_JOB_STATUS_POSTCOPY
A qemu: drop QEMU_MIGRATION_COMPLETED_UPDATE_STATS
A qemu: drop excessive zero-out in qemuMigrationFetchJobStatus
qemu: refactor fetching migration stats
A qemu: simplify getting completed job stats
qemu: fail querying destination migration statistics always
qemu: start all async job with job status active
qemu: introduce migrating job status
qemu: always get job condition on getting job stats
qemu: migrate: show disks stats on job info requests
qemu: support getting disks stats during stopping block jobs
qemu: migation: resolve race on getting job info and stopping block jobs
qemu: migrate: copy disks stats to completed job
qemu: migration: don't expose incomplete job as complete
src/qemu/qemu_blockjob.c | 1 +
src/qemu/qemu_domain.c | 38 +++++--
src/qemu/qemu_domain.h | 16 ++-
src/qemu/qemu_driver.c | 95 ++++++++--------
src/qemu/qemu_migration.c | 236 ++++++++++++++++++++++++++-------------
src/qemu/qemu_migration.h | 15 ++-
src/qemu/qemu_migration_cookie.c | 7 +-
src/qemu/qemu_monitor.c | 5 +-
src/qemu/qemu_monitor.h | 4 +-
src/qemu/qemu_monitor_json.c | 4 +-
src/qemu/qemu_process.c | 10 +-
tests/qemumonitorjsontest.c | 1 +
12 files changed, 273 insertions(+), 159 deletions(-)
--
1.8.3.1
7 years, 4 months
[libvirt] [PATCH] Use unsigned timeout in cmdMigrateSetMaxDowntime
by Scott Garfinkle
While looking to implement a migrate-getmaxdowntime command (coming),
I noticed that the setmaxdowntime is incorrectly looking at its
parameter as a signed longlong. Not sure how that got past gcc, but
here's a simple patch to make the command line parsing and the parameter to
the worker functions all have the correct (unsigned) type.
Signed-off-by: Scott Garfinkle <seg(a)us.ibm.com>
---
tools/virsh-domain.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 5311a57..0d21fe7 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -10696,13 +10696,13 @@ static bool
cmdMigrateSetMaxDowntime(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom = NULL;
- long long downtime = 0;
+ unsigned long long downtime = 0;
bool ret = false;
if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
return false;
- if (vshCommandOptLongLong(ctl, cmd, "downtime", &downtime) < 0)
+ if (vshCommandOptULongLong(ctl, cmd, "downtime", &downtime) < 0)
goto done;
if (downtime < 1) {
vshError(ctl, "%s", _("migrate: Invalid downtime"));
--
1.8.3.1
7 years, 4 months
[libvirt] [PATCH v7 0/6] Hyper-V method invocation
by Sri Ramanujam
Changes from v6:
* Added news entry
Sri Ramanujam (6):
hyperv: Functions to work with invocation parameters.
hyperv: Generate object property type information.
hyperv: add hypervInvokeMethod
hyperv: support virDomainSendKey
hyperv: Add support for virDomainSetMemory
news: Update news for new Hyper-V APIs
docs/news.xml | 5 +
src/hyperv/hyperv_driver.c | 237 +++++++++
src/hyperv/hyperv_wmi.c | 910 ++++++++++++++++++++++++++++++++++
src/hyperv/hyperv_wmi.h | 95 +++-
src/hyperv/hyperv_wmi_classes.h | 19 +
src/hyperv/hyperv_wmi_generator.input | 116 +++++
src/hyperv/hyperv_wmi_generator.py | 15 +-
src/hyperv/openwsman.h | 4 +
8 files changed, 1399 insertions(+), 2 deletions(-)
--
2.9.4
7 years, 4 months
[libvirt] [PATCH] test/Makefile.am: drop WARN_CFLAGS from LDFLAGS
by Ján Tomko
Introduced by commit 0832c58, with the intention to link with
the stack protector library.
Another instance introduced by commit 4cbc15d which separated
commandhelper_LDADD from LDADDS.
Not needed because per commit 71b54636, automake should pass
all the CFLAGS to the linker.
---
tests/Makefile.am | 2 --
1 file changed, 2 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 19986dc99..3d3038e62 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -76,7 +76,6 @@ GNULIB_LIBS = \
../gnulib/lib/libgnu.la
LDADDS = \
- $(WARN_CFLAGS) \
$(NO_INDIRECT_LDFLAGS) \
$(PROBES_O) \
$(GNULIB_LIBS) \
@@ -933,7 +932,6 @@ commandtest_LDADD = $(LDADDS)
commandhelper_SOURCES = \
commandhelper.c
commandhelper_LDADD = \
- $(WARN_CFLAGS) \
$(NO_INDIRECT_LDFLAGS) \
$(PROBES_O) \
../src/libvirt_util.la \
--
2.13.0
7 years, 4 months
[libvirt] [RFC PATCH v2 0/4] numa: describe sibling nodes distances
by Wim Ten Have
From: Wim ten Have <wim.ten.have(a)oracle.com>
This patch extents guest domain administration adding support to advertise
node sibling distances when configuring HVM numa guests.
NUMA (non-uniform memory access), a method of configuring a cluster of nodes
within a single multiprocessing system such that it shares processor
local memory amongst others improving performance and the ability of the
system to be expanded.
A NUMA system could be illustrated as shown below. Within this 4-node
system, every socket is equipped with its own distinct memory. The whole
typically resembles a SMP (symmetric multiprocessing) system being a
"tightly-coupled," "share everything" system in which multiple processors
are working under a single operating system and can access each others'
memory over multiple "Bus Interconnect" paths.
+-----+-----+-----+ +-----+-----+-----+
| M | CPU | CPU | | CPU | CPU | M |
| E | | | | | | E |
| M +- Socket0 -+ +- Socket3 -+ M |
| O | | | | | | O |
| R | CPU | CPU <---------> CPU | CPU | R |
| Y | | | | | | Y |
+-----+--^--+-----+ +-----+--^--+-----+
| |
| Bus Interconnect |
| |
+-----+--v--+-----+ +-----+--v--+-----+
| M | | | | | | M |
| E | CPU | CPU <---------> CPU | CPU | E |
| M | | | | | | M |
| O +- Socket1 -+ +- Socket2 -+ O |
| R | | | | | | R |
| Y | CPU | CPU | | CPU | CPU | Y |
+-----+-----+-----+ +-----+-----+-----+
In contrast there is the limitation of a flat SMP system, not illustrated.
Here, as sockets are added, the bus (data and address path), under high
activity, gets overloaded and easily becomes a performance bottleneck.
NUMA adds an intermediate level of memory shared amongst a few cores per
socket as illustrated above, so that data accesses do not have to travel
over a single bus.
Unfortunately the way NUMA does this adds its own limitations. This,
as visualized in the illustration above, happens when data is stored in
memory associated with Socket2 and is accessed by a CPU (core) in Socket0.
The processors use the "Bus Interconnect" to create gateways between the
sockets (nodes) enabling inter-socket access to memory. These "Bus
Interconnect" hops add data access delays when a CPU (core) accesses
memory associated with a remote socket (node).
For terminology we refer to sockets as "nodes" where access to each
others' distinct resources such as memory make them "siblings" with a
designated "distance" between them. A specific design is described under
the ACPI (Advanced Configuration and Power Interface Specification)
within the chapter explaining the system's SLIT (System Locality Distance
Information Table).
These patches extend core libvirt's XML description of a virtual machine's
hardware to include NUMA distance information for sibling nodes, which
is then passed to Xen guests via libxl. Recently qemu landed support for
constructing the SLIT since commit 0f203430dd ("numa: Allow setting NUMA
distance for different NUMA nodes"), hence these core libvirt extensions
can also help other drivers in supporting this feature.
The XML changes made allow to describe the <cell> (or node/sockets) <distances>
amongst <sibling> node identifiers and propagate these towards the numa
domain functionality finally adding support to libxl.
[below is an example illustrating a 4 node/socket <cell> setup]
<cpu>
<numa>
<cell id='0' cpus='0,4-7' memory='2097152' unit='KiB'>
<distances>
<sibling id='0' value='10'/>
<sibling id='1' value='21'/>
<sibling id='2' value='31'/>
<sibling id='3' value='41'/>
</distances>
</cell>
<cell id='1' cpus='1,8-10,12-15' memory='2097152' unit='KiB'>
<distances>
<sibling id='0' value='21'/>
<sibling id='1' value='10'/>
<sibling id='2' value='21'/>
<sibling id='3' value='31'/>
</distances>
</cell>
<cell id='2' cpus='2,11' memory='2097152' unit='KiB'>
<distances>
<sibling id='0' value='31'/>
<sibling id='1' value='21'/>
<sibling id='2' value='10'/>
<sibling id='3' value='21'/>
</distances>
</cell>
<cell id='3' cpus='3' memory='2097152' unit='KiB'>
<distances>
<sibling id='0' value='41'/>
<sibling id='1' value='31'/>
<sibling id='2' value='21'/>
<sibling id='3' value='10'/>
</distances>
</cell>
</numa>
</cpu>
By default on libxl, if no <distances> are given to describe the SLIT data
between different <cell>s, this patch will default to a scheme using 10
for local and 21 for any remote node/socket, which is the assumption of
guest OS when no SLIT is specified. While SLIT is optional, libxl requires
that distances are set nonetheless.
On Linux systems the SLIT detail can be listed with help of the 'numactl -H'
command. An above HVM guest as described would on such prompt with below output.
[root@f25 ~]# numactl -H
available: 4 nodes (0-3)
node 0 cpus: 0 4 5 6 7
node 0 size: 1988 MB
node 0 free: 1743 MB
node 1 cpus: 1 8 9 10 12 13 14 15
node 1 size: 1946 MB
node 1 free: 1885 MB
node 2 cpus: 2 11
node 2 size: 2011 MB
node 2 free: 1912 MB
node 3 cpus: 3
node 3 size: 2010 MB
node 3 free: 1980 MB
node distances:
node 0 1 2 3
0: 10 21 31 41
1: 21 10 21 31
2: 31 21 10 21
3: 41 31 21 10
Wim ten Have (4):
numa: describe siblings distances within cells
libxl: vnuma support
xenconfig: add domxml conversions for xen-xl
xlconfigtest: add tests for numa cell sibling distances
docs/formatdomain.html.in | 64 ++++-
docs/schemas/basictypes.rng | 8 +
docs/schemas/cputypes.rng | 18 ++
src/conf/cpu_conf.c | 2 +-
src/conf/numa_conf.c | 260 +++++++++++++++++-
src/conf/numa_conf.h | 25 +-
src/libvirt_private.syms | 6 +
src/libxl/libxl_conf.c | 124 +++++++++
src/xenconfig/xen_xl.c | 303 +++++++++++++++++++++
.../test-fullvirt-vnuma-nodistances.cfg | 26 ++
.../test-fullvirt-vnuma-nodistances.xml | 53 ++++
tests/xlconfigdata/test-fullvirt-vnuma.cfg | 26 ++
tests/xlconfigdata/test-fullvirt-vnuma.xml | 81 ++++++
tests/xlconfigtest.c | 4 +
14 files changed, 993 insertions(+), 7 deletions(-)
create mode 100644 tests/xlconfigdata/test-fullvirt-vnuma-nodistances.cfg
create mode 100644 tests/xlconfigdata/test-fullvirt-vnuma-nodistances.xml
create mode 100644 tests/xlconfigdata/test-fullvirt-vnuma.cfg
create mode 100644 tests/xlconfigdata/test-fullvirt-vnuma.xml
--
2.9.4
7 years, 4 months
[libvirt] [v2 RESEND PATCH] qemu: reduce packet loss rate for vm with macvtap passthrough mode in migration
by ZhiPeng Lu
Before libvirt that calls virNetDevMacVLanCreateWithVPortProfile sets mac address
or vlan of a Virtual Function(VF) linked to a macvtap passthrough device of migration
destination host in migration start step. If we ping the migrating vm,
we get the network does not pass. Because VFs of migration source and destination
have the same MAC address. The patch later calling qemuMigrationVPAssociatePortProfiles
sets mac address of VF in migration finish step instead of start step.
The patch aims to reduce packet loss rate.
Signed-off-by: ZhiPeng Lu <lu.zhipeng(a)zte.com.cn>
---
src/qemu/qemu_migration.c | 18 ++++++++++++++++--
src/util/virnetdevmacvlan.c | 17 +++++++++++------
2 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 09adb04..795ed71 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -5004,7 +5004,7 @@ qemuMigrationPerform(virQEMUDriverPtr driver,
}
static int
-qemuMigrationVPAssociatePortProfiles(virDomainDefPtr def)
+qemuMigrationVPAssociatePortProfiles(virDomainDefPtr def, const char *stateDir)
{
size_t i;
int last_good_net = -1;
@@ -5013,6 +5013,20 @@ qemuMigrationVPAssociatePortProfiles(virDomainDefPtr def)
for (i = 0; i < def->nnets; i++) {
net = def->nets[i];
if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_DIRECT) {
+ if ((!virDomainNetGetActualVirtPortProfile(net) || (virDomainNetGetActualVirtPortProfile(net) &&
+ virDomainNetGetActualVirtPortProfile(net)->virtPortType != VIR_NETDEV_VPORT_PROFILE_8021QBG &&
+ virDomainNetGetActualVirtPortProfile(net)->virtPortType != VIR_NETDEV_VPORT_PROFILE_8021QBH)) &&
+ virDomainNetGetActualDirectMode(net) ==
+ VIR_NETDEV_MACVLAN_MODE_PASSTHRU) {
+ if (virNetDevSaveNetConfig(virDomainNetGetActualDirectDev(net),
+ -1, stateDir, false) < 0) {
+ goto err_exit;
+ }
+ if (virNetDevSetNetConfig(virDomainNetGetActualDirectDev(net),
+ -1, NULL, virDomainNetGetActualVlan(net), &net->mac, false) < 0) {
+ goto err_exit;
+ }
+ }
if (virNetDevVPortProfileAssociate(net->ifname,
virDomainNetGetActualVirtPortProfile(net),
&net->mac,
@@ -5187,7 +5201,7 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
goto endjob;
}
- if (qemuMigrationVPAssociatePortProfiles(vm->def) < 0)
+ if (qemuMigrationVPAssociatePortProfiles(vm->def, cfg->stateDir) < 0)
goto endjob;
if (mig->network && qemuDomainMigrateOPDRelocate(driver, vm, mig) < 0)
diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c
index 7222b0f..682dcd1 100644
--- a/src/util/virnetdevmacvlan.c
+++ b/src/util/virnetdevmacvlan.c
@@ -1020,12 +1020,17 @@ virNetDevMacVLanCreateWithVPortProfile(const char *ifnameRequested,
*/
setVlan = false;
}
-
- if (virNetDevSaveNetConfig(linkdev, -1, stateDir, setVlan) < 0)
- return -1;
-
- if (virNetDevSetNetConfig(linkdev, -1, NULL, vlan, macaddress, setVlan) < 0)
- return -1;
+ if (vmOp != VIR_NETDEV_VPORT_PROFILE_OP_MIGRATE_IN_START &&
+ virtPortProfile && (virtPortProfile->virtPortType == VIR_NETDEV_VPORT_PROFILE_8021QBH ||
+ virtPortProfile->virtPortType == VIR_NETDEV_VPORT_PROFILE_8021QBG)) {
+ if (virNetDevSaveNetConfig(linkdev, -1, stateDir, setVlan) < 0) {
+ return -1;
+ }
+ if (virNetDevSetNetConfig(linkdev, -1, NULL, vlan, macaddress,
+ setVlan) < 0) {
+ return -1;
+ }
+ }
}
if (ifnameRequested) {
--
1.8.3.1
7 years, 4 months
[libvirt] [PATCH 0/3] exposing busy polling support for vhost-net
by sferdjao@redhat.com
From: Sahid Orentino Ferdjaoui <sahid.ferdjaoui(a)redhat.com>
In version 2.7.0, QEMU introduced support of busy polling for
vhost-net [0]. To avoid paraphrasing original authors of that feature
and the purpose it I prefer to share a pointer [1].
This patch serie exposes throught the NIC driver-specific element a
new option 'poll_us'. That option is only available with the backend
driver 'vhost'.
The option 'poll_us' takes a positive number. 0 means that the option
is not going to be exposed.
[0] 69e87b32680a41d9761191443587c595b6f5fc3f
[1] https://lists.gnu.org/archive/html/qemu-devel/2016-11/msg04595.html
Sahid Orentino Ferdjaoui (3):
qemu: add capability for vhost-net busy polling
conf: introduce 'poll_us' attribute for domain interface
qemu: add busy polling support
docs/formatdomain.html.in | 12 ++++++++++-
docs/schemas/domaincommon.rng | 5 +++++
src/conf/domain_conf.c | 16 +++++++++++++++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 6 ++++++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 22 +++++++++++++++++++++
src/qemu/qemu_hotplug.c | 12 +++++++++++
tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 +
.../qemuxml2argv-net-virtio-netdev-pollus-fail.xml | 23 ++++++++++++++++++++++
...xml2argv-net-virtio-netdev-pollus-qemu-fail.xml | 23 ++++++++++++++++++++++
.../qemuxml2argv-net-virtio-netdev-pollus.args | 23 ++++++++++++++++++++++
.../qemuxml2argv-net-virtio-netdev-pollus.xml | 23 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 9 +++++++++
18 files changed, 180 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev-pollus-fail.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev-pollus-qemu-fail.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev-pollus.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev-pollus.xml
--
2.9.4
7 years, 4 months
[libvirt] [PATCH] util: increase libnl buffer size to 1M
by ZhiPeng Lu
nl_recv() returns the error "No buffer space available"
when using virsh destroy domain with 240 or more
passhthrough network interfaces.
The patch increases libnl sock receive buffer size to 1M,
and nl_recv() doesn't return error when destroying domain
with 512 network interfaces.
Signed-off-by: ZhiPeng Lu <lu.zhipeng(a)zte.com.cn>
---
src/util/virnetlink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
index 92ecf77..bb56c54 100644
--- a/src/util/virnetlink.c
+++ b/src/util/virnetlink.c
@@ -189,10 +189,10 @@ virNetlinkCreateSocket(int protocol)
goto error;
}
- if (virNetlinkSetBufferSize(nlhandle, 131702, 0) < 0) {
+ if (virNetlinkSetBufferSize(nlhandle, 1048576, 0) < 0) {
virReportSystemError(errno, "%s",
_("cannot set netlink socket buffer "
- "size to 128k"));
+ "size to 1M"));
goto error;
}
nl_socket_enable_msg_peek(nlhandle);
--
1.8.3.1
7 years, 4 months