[PATCH for 8.7.0 00/80] Remove pre-blockdev disk setup code
by Peter Krempa
Starting with libvirt-8.7.0 we'll support qemu-4.2 as minimum and thus
we'll only use -blockdev now. Remove the old cruft.
This series applies on top of the patches bumping minimum qemu version
to qemu-4.2 I've posted earlier.
The whole branch can be fetched at:
git fetch https://gitlab.com/pipo.sk/libvirt.git blockdev-remove-2
Peter Krempa (80):
qemu: Allways assume QEMU_CAPS_CHANGE_BACKING_FILE
qemu: capabilities: Retire QEMU_CAPS_CHANGE_BACKING_FILE
qemu: Always assume support for QEMU_CAPS_ACTIVE_COMMIT
qemu: capabilities: Retire QEMU_CAPS_ACTIVE_COMMIT
qemu: Always assume support for QEMU_CAPS_GLUSTER_DEBUG_LEVEL
qemu: capabilities: Retire QEMU_CAPS_GLUSTER_DEBUG_LEVEL
qemu: Always assume support for QEMU_CAPS_DRIVE_DISCARD and
QEMU_CAPS_DRIVE_DETECT_ZEROES
qemu: capabilities: Retire QEMU_CAPS_DRIVE_DISCARD and
QEMU_CAPS_DRIVE_DETECT_ZEROES
qemuxml2argvtest: Use DO_TEST_CAPS_LATEST for all 'user-aliases' tests
qemuxml2xmltest: Modernize all test cases using QEMU_CAPS_QCOW2_LUKS
qemu: Always assume support for QEMU_CAPS_QCOW2_LUKS
qemu: capabilities: Retire QEMU_CAPS_QCOW2_LUKS
qemu: capabilities: Unconditionally set
QEMU_CAPS_BLOCKDEV/QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI
tests: Force QEMU_CAPS_BLOCKDEV(_HOSTDEV_SCSI) in fake caps tests
qemu: Refactor access to 'qomName' field of the qemu disk private data
qemu: command: Always assume support for QEMU_CAPS_SCSI_DISK_DEVICE_ID
qemu: capabilities: Retire capabilities used for -blockdev detection
qemu: Remove code conditional on QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI
qemu: capabilities: Retire QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI
qemu: block: Remove legacy spellings for InetSocketAddress
qemu: migration: Remove pre-blockdev code paths
qemuMigrationSrcNBDStorageCopyBlockdev: Remove some arguments
qemu: migration: Assume support for QEMU_CAPS_BLOCKDEV_DEL
qemu: capabilities: Retire QEMU_CAPS_BLOCKDEV_DEL
qemu: snapshot: Remove pre-blockdev code paths
qemu: Remove unused code for pre-blockdev disk snapshot monitor
interaction
qemu: block: Remove pre-blockdev code paths
qemu: migration_cookie: Remove pre-blockdev code paths
qemu: validate: Remove impossible validation checks
qemu: process: Remove pre-blockdev code paths
qemu: blockjob: Remove legacy block job completion code
qemu: Remove legacy block job event processing handler
qemu: monitor: Remove infrastructure for BLOCK_JOB_* events
qemuDomainSetBlockThreshold: Remove pre-blockdev node name detection
qemu: block: Remove 'qemuBlockNodeNamesDetect' and related
infrastructure
qemu: blockjob: Remove pre-blockdev blockjob setup
qemu: alias: Remove check for QEMU_CAPS_BLOCKDEV
qemuDomainGetStatsBlock: Remove pre-blockdev code paths
qemu: block: Remove unused qemuBlockGetNodeData
qemu: monitor: Remove unused qemuMonitorQueryNamedBlockNodes and clean
up
qemu: driver: Remove pre-blockdev code paths from
qemuDomainBlockCopyCommon
qemu: monitor: Remove unused qemuMonitorDriveMirror
qemu: driver: Remove pre-blockdev code paths from
qemuDomainBlockCommit
qemu: monitor: Remove unused arguments of qemuMonitorBlockCommit
qemu: driver: Remove pre-blockdev code paths from
qemuDomainBlockPullCommon
qemu: monitor: Remove unused arguments of qemuMonitorBlockStream
qemu: monitor: Remove unused qemuMonitorDiskNameLookup
qemu: driver: Remove pre-blockdev code paths from qemuDomainBlockPivot
qemu: monitor: Remove unused qemuMonitorDrivePivot
qemu: command: Remove pre-blockdev floppy setup
qemu: Remove pre-blockdev PFLASH setup
qemuDomainBlockResize: Always refuse resize of empty/readonly disks
qemuDomainBlocksStatsGather: Remove pre-blockdev code paths
qemu: monitor: Remove unused qemuMonitorBlockStatsUpdateCapacity
qemu: driver: Remove remaining QEMU_CAPS_BLOCKDEV capability checks
qemu: hotplug: Remove pre-blockdev code path from
qemuDomainChangeEjectableMedia
qemu: monitor: Remove unused qemuMonitor(Eject|Change)Media
qemuhotplugtest: Switch to -blockdev mode
qemuDomainRemoveDiskDevice: Remove special casing for disks on 'sd'
bus
qemu: hotplug: Remove pre-blockdev code paths
qemu: block: Remove unused
qemuBlockStorageSourceChainDetachPrepareLegacy
qemu: Remove 'driveAlias' argument of
qemuBlockStorageSourceDetachPrepare
qemu: block: Remove support for legacy disk hotplug/unplug
qemu: monitor: Remove unused qemuMonitorAddDrive/qemuMonitorDriveDel
qemu: command: Delegate qemuBuildDriveStr to SD cards only
qemu: command: Generate -drive for SD cards via JSON props
qemu: command: Remove unused qemuGetDriveSourceString
qemu: domain: Assume QEMU_CAPS_BLOCKDEV for the domain private code
qemuDomainSecretStorageSourcePrepare: Remove cabapbility check when
preparing cookies
qemuDomainDiskBlockJobIsSupported: Assume QEMU_CAPS_BLOCKDEV is
supported
qemuDomainDiskGetBackendAlias: Assume QEMU_CAPS_BLOCKDEV is supported
qemuDomainValidateStorageSource: Remove QEMU_CAPS_BLOCKDEV validation
qemuDomainValidateStorageSource: Remove 'maskBlockdev' argument
qemuDomainDetermineDiskChain: Assume QEMU_CAPS_BLOCKDEV
qemu: Retire QEMU_CAPS_BLOCKDEV
qemu: Setup disk throttling for SD cards via monitor
qemu: capabilities: Retire QEMU_CAPS_QUERY_NAMED_BLOCK_NODES
qemu: Assume support and retire QEMU_CAPS_BLOCK_WRITE_THRESHOLD
qemu: Assume and retire QEMU_CAPS_BLOCKDEV_BACKUP
qemuDomainDetermineDiskChain: Remove 'report_broken' argument
src/qemu/qemu_alias.c | 10 +-
src/qemu/qemu_alias.h | 5 +-
src/qemu/qemu_backup.c | 10 +-
src/qemu/qemu_block.c | 461 +-----------
src/qemu/qemu_block.h | 27 +-
src/qemu/qemu_blockjob.c | 170 +----
src/qemu/qemu_capabilities.c | 67 +-
src/qemu/qemu_capabilities.h | 30 +-
src/qemu/qemu_checkpoint.c | 2 +-
src/qemu/qemu_command.c | 655 ++---------------
src/qemu/qemu_command.h | 4 -
src/qemu/qemu_domain.c | 195 ++---
src/qemu/qemu_domain.h | 14 +-
src/qemu/qemu_driver.c | 564 ++++-----------
src/qemu/qemu_hotplug.c | 118 +--
src/qemu/qemu_migration.c | 147 +---
src/qemu/qemu_migration_cookie.c | 19 +-
src/qemu/qemu_monitor.c | 184 +----
src/qemu/qemu_monitor.h | 62 --
src/qemu/qemu_monitor_json.c | 447 +-----------
src/qemu/qemu_monitor_json.h | 53 --
src/qemu/qemu_monitor_text.c | 82 ---
src/qemu/qemu_monitor_text.h | 6 -
src/qemu/qemu_process.c | 209 +-----
src/qemu/qemu_snapshot.c | 125 +---
src/qemu/qemu_validate.c | 34 +-
tests/domaincapsdata/qemu_4.2.0.ppc64.xml | 2 +-
tests/qemublocktest.c | 4 +-
.../caps_4.2.0.aarch64.xml | 15 -
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 11 -
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 15 -
.../caps_4.2.0.x86_64.xml | 15 -
.../caps_5.0.0.aarch64.xml | 15 -
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 15 -
.../caps_5.0.0.riscv64.xml | 15 -
.../caps_5.0.0.x86_64.xml | 15 -
.../qemucapabilitiesdata/caps_5.1.0.sparc.xml | 15 -
.../caps_5.1.0.x86_64.xml | 15 -
.../caps_5.2.0.aarch64.xml | 15 -
.../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 15 -
.../caps_5.2.0.riscv64.xml | 15 -
.../qemucapabilitiesdata/caps_5.2.0.s390x.xml | 15 -
.../caps_5.2.0.x86_64.xml | 15 -
.../caps_6.0.0.aarch64.xml | 15 -
.../qemucapabilitiesdata/caps_6.0.0.s390x.xml | 15 -
.../caps_6.0.0.x86_64.xml | 15 -
.../caps_6.1.0.x86_64.xml | 15 -
.../caps_6.2.0.aarch64.xml | 15 -
.../qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 15 -
.../caps_6.2.0.x86_64.xml | 15 -
.../caps_7.0.0.aarch64.xml | 15 -
.../qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 15 -
.../caps_7.0.0.x86_64.xml | 15 -
.../caps_7.1.0.x86_64.xml | 15 -
tests/qemuhotplugtest.c | 76 +-
.../qemuhotplug-base-ccw-live+ccw-virtio.xml | 2 +-
...with-2-ccw-virtio+ccw-virtio-1-reverse.xml | 4 +-
...otplug-base-ccw-live-with-2-ccw-virtio.xml | 2 +-
...-with-ccw-virtio+ccw-virtio-2-explicit.xml | 2 +-
...-ccw-live-with-ccw-virtio+ccw-virtio-2.xml | 2 +-
.../qemuhotplug-base-live+cdrom-scsi.xml | 2 +-
.../qemuhotplug-base-live+cdrom-usb.xml | 2 +-
...uhotplug-base-live+disk-scsi-multipath.xml | 2 +-
...+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml | 2 +-
.../qemuhotplug-base-live+disk-scsi.xml | 2 +-
.../qemuhotplug-base-live+disk-usb.xml | 2 +-
.../qemuhotplug-base-live+disk-virtio.xml | 2 +-
...thout-scsi-controller-live+disk-scsi-2.xml | 2 +-
...monitorjson-nodename-basic-blockstats.json | 166 -----
...onitorjson-nodename-basic-named-nodes.json | 268 -------
.../qemumonitorjson-nodename-basic.result | 16 -
...itorjson-nodename-blockjob-blockstats.json | 301 --------
...torjson-nodename-blockjob-named-nodes.json | 682 ------------------
.../qemumonitorjson-nodename-blockjob.result | 26 -
...monitorjson-nodename-empty-blockstats.json | 2 -
...onitorjson-nodename-empty-named-nodes.json | 2 -
.../qemumonitorjson-nodename-empty.result | 0
...nitorjson-nodename-gluster-blockstats.json | 111 ---
...itorjson-nodename-gluster-named-nodes.json | 135 ----
.../qemumonitorjson-nodename-gluster.result | 11 -
...monitorjson-nodename-iscsi-blockstats.json | 113 ---
...onitorjson-nodename-iscsi-named-nodes.json | 114 ---
.../qemumonitorjson-nodename-iscsi.result | 13 -
...umonitorjson-nodename-luks-blockstats.json | 58 --
...monitorjson-nodename-luks-named-nodes.json | 109 ---
.../qemumonitorjson-nodename-luks.result | 6 -
...mumonitorjson-nodename-old-blockstats.json | 160 ----
...umonitorjson-nodename-old-named-nodes.json | 2 -
.../qemumonitorjson-nodename-old.result | 0
...itorjson-nodename-relative-blockstats.json | 329 ---------
...torjson-nodename-relative-named-nodes.json | 554 --------------
.../qemumonitorjson-nodename-relative.result | 33 -
...json-nodename-same-backing-blockstats.json | 221 ------
...son-nodename-same-backing-named-nodes.json | 316 --------
...mumonitorjson-nodename-same-backing.result | 23 -
tests/qemumonitorjsontest.c | 105 +--
.../blockjob-mirror-in.xml | 1 +
.../migration-in-params-in.xml | 1 +
.../migration-out-nbd-out.xml | 1 +
.../migration-out-nbd-tls-out.xml | 1 +
.../migration-out-params-in.xml | 1 +
tests/qemustatusxml2xmldata/upgrade-out.xml | 1 +
.../qemustatusxml2xmldata/vcpus-multi-in.xml | 1 +
.../aarch64-aavmf-virtio-mmio.args | 5 +-
.../aarch64-cpu-passthrough.args | 5 +-
.../aarch64-kvm-32-on-64.args | 5 +-
.../aarch64-virt-2.6-virtio-pci-default.args | 5 +-
.../qemuxml2argvdata/aarch64-virt-virtio.args | 5 +-
.../aarch64-virtio-pci-default.args | 5 +-
.../aarch64-virtio-pci-manual-addresses.args | 5 +-
.../arm-vexpressa9-virtio.args | 5 +-
tests/qemuxml2argvdata/arm-virt-virtio.args | 5 +-
tests/qemuxml2argvdata/audio-default-sdl.args | 5 +-
.../qemuxml2argvdata/audio-default-spice.args | 5 +-
tests/qemuxml2argvdata/audio-default-vnc.args | 5 +-
tests/qemuxml2argvdata/autoindex.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 +-
tests/qemuxml2argvdata/blkiotune-device.args | 5 +-
tests/qemuxml2argvdata/blkiotune.args | 5 +-
tests/qemuxml2argvdata/boot-cdrom.args | 5 +-
tests/qemuxml2argvdata/boot-complex.args | 35 +-
tests/qemuxml2argvdata/boot-floppy-q35.args | 6 +-
tests/qemuxml2argvdata/boot-floppy.args | 10 +-
.../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 | 20 +-
tests/qemuxml2argvdata/channel-guestfwd.args | 5 +-
tests/qemuxml2argvdata/channel-spicevmc.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/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 +-
tests/qemuxml2argvdata/clock-realtime.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 +-
.../qemuxml2argvdata/console-virtio-ccw.args | 5 +-
.../qemuxml2argvdata/console-virtio-many.args | 5 +-
tests/qemuxml2argvdata/console-virtio.args | 5 +-
tests/qemuxml2argvdata/controller-order.args | 10 +-
.../cpu-host-passthrough-features.args | 5 +-
.../qemuxml2argvdata/cputune-zero-shares.args | 5 +-
tests/qemuxml2argvdata/cputune.args | 5 +-
tests/qemuxml2argvdata/disk-nvme.xml | 5 +-
.../qemuxml2argvdata/encrypted-disk-usage.xml | 5 +-
.../firmware-manual-efi-acpi-aarch64.args | 8 +-
.../firmware-manual-efi-acpi-q35.args | 8 +-
.../firmware-manual-efi-noacpi-aarch64.args | 8 +-
.../firmware-manual-efi-secure.args | 8 +-
.../qemuxml2argvdata/firmware-manual-efi.args | 8 +-
.../qemuxml2argvdata/graphics-dbus-audio.args | 5 +-
.../graphics-egl-headless.args | 5 +-
.../graphics-sdl-fullscreen.args | 5 +-
tests/qemuxml2argvdata/graphics-sdl.args | 5 +-
.../hostdev-scsi-vhost-scsi-ccw.args | 5 +-
.../hostdev-scsi-vhost-scsi-pci.args | 5 +-
.../hostdev-vfio-multidomain.args | 5 +-
tests/qemuxml2argvdata/hostdev-vfio.args | 5 +-
.../qemuxml2argvdata/hugepages-memaccess.args | 5 +-
.../hugepages-memaccess2.args | 5 +-
tests/qemuxml2argvdata/hugepages-shared.args | 5 +-
.../hvf-aarch64-virt-headless.args | 13 +-
.../hvf-x86_64-q35-headless.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 +-
.../iothreads-disk-virtio-ccw.args | 10 +-
tests/qemuxml2argvdata/iothreads-disk.args | 15 +-
.../iothreads-ids-partial.args | 5 +-
tests/qemuxml2argvdata/iothreads-ids.args | 5 +-
tests/qemuxml2argvdata/iothreads.args | 5 +-
tests/qemuxml2argvdata/kvm-pit-delay.args | 5 +-
tests/qemuxml2argvdata/kvm-pit-discard.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 | 10 +-
.../machine-loadparm-s390.args | 5 +-
.../qemuxml2argvdata/machine-vmport-opt.args | 5 +-
tests/qemuxml2argvdata/master-key.args | 5 +-
.../memory-hotplug-dimm-addr.args | 5 +-
.../qemuxml2argvdata/memory-hotplug-dimm.args | 5 +-
tests/qemuxml2argvdata/memory-hotplug.args | 5 +-
tests/qemuxml2argvdata/memtune-unlimited.args | 5 +-
tests/qemuxml2argvdata/memtune.args | 5 +-
tests/qemuxml2argvdata/migrate.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-uuid.args | 5 +-
tests/qemuxml2argvdata/monitor-json.args | 5 +-
.../multifunction-pci-device.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 +-
.../net-eth-unmanaged-tap.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-virtio-device.args | 5 +-
.../net-virtio-disable-offloads.args | 5 +-
tests/qemuxml2argvdata/net-virtio-netdev.args | 5 +-
.../net-virtio-rxtxqueuesize.args | 5 +-
.../net-virtio-teaming-hostdev.args | 5 +-
.../qemuxml2argvdata/net-virtio-teaming.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 +-
tests/qemuxml2argvdata/numatune-memory.args | 5 +-
.../parallel-parport-chardev.args | 5 +-
.../parallel-tcp-chardev.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 | 525 ++++++++------
tests/qemuxml2argvdata/pci-bridge.args | 5 +-
tests/qemuxml2argvdata/pci-many.args | 145 ++--
tests/qemuxml2argvdata/pci-rom.args | 5 +-
.../pci-serial-dev-chardev.args | 5 +-
tests/qemuxml2argvdata/pcie-expander-bus.args | 5 +-
tests/qemuxml2argvdata/pcie-root-port.args | 5 +-
.../pcie-switch-downstream-port.args | 5 +-
.../pcie-switch-upstream-port.args | 5 +-
tests/qemuxml2argvdata/pcihole64-q35.args | 5 +-
.../pseries-vio-user-assigned.args | 5 +-
tests/qemuxml2argvdata/pseries-vio.args | 5 +-
tests/qemuxml2argvdata/q35-pcie-autoadd.args | 5 +-
tests/qemuxml2argvdata/q35-pcie.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/restore-v2-fd.args | 5 +-
tests/qemuxml2argvdata/restore-v2.args | 5 +-
tests/qemuxml2argvdata/riscv64-virt-pci.args | 5 +-
tests/qemuxml2argvdata/riscv64-virt.args | 5 +-
tests/qemuxml2argvdata/seclabel-dac-none.args | 5 +-
.../seclabel-dynamic-baselabel.args | 5 +-
.../seclabel-dynamic-labelskip.args | 5 +-
.../seclabel-dynamic-override.args | 10 +-
.../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 +-
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 +-
tests/qemuxml2argvdata/serial-vc-chardev.args | 5 +-
tests/qemuxml2argvdata/smbios-type-fwcfg.args | 5 +-
tests/qemuxml2argvdata/smbios.args | 5 +-
tests/qemuxml2argvdata/smp-dies.args | 5 +-
tests/qemuxml2argvdata/smp.args | 5 +-
tests/qemuxml2argvdata/sound-device.args | 5 +-
tests/qemuxml2argvdata/sound.args | 5 +-
tests/qemuxml2argvdata/sparc-minimal.args | 10 +-
tests/qemuxml2argvdata/user-aliases-usb.args | 41 --
.../user-aliases-usb.x86_64-latest.args | 44 ++
tests/qemuxml2argvdata/user-aliases.args | 68 --
.../user-aliases.x86_64-latest.args | 74 ++
tests/qemuxml2argvdata/user-aliases.xml | 5 +-
tests/qemuxml2argvdata/user-aliases2.args | 1 -
.../user-aliases2.x86_64-latest.args | 39 +
.../video-device-pciaddr-default.args | 5 +-
tests/qemuxml2argvdata/video-none-device.args | 5 +-
.../video-qxl-device-vgamem.args | 5 +-
tests/qemuxml2argvdata/video-qxl-device.args | 5 +-
tests/qemuxml2argvdata/video-qxl-heads.args | 5 +-
tests/qemuxml2argvdata/video-qxl-noheads.args | 5 +-
.../video-qxl-resolution.args | 5 +-
.../video-qxl-sec-device-vgamem.args | 5 +-
.../video-qxl-sec-device.args | 5 +-
.../video-vga-device-vgamem.args | 5 +-
tests/qemuxml2argvdata/video-vga-device.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-spice-gl.args | 5 +-
.../video-virtio-gpu-virgl.args | 5 +-
tests/qemuxml2argvdata/video-virtio-vga.args | 5 +-
tests/qemuxml2argvdata/virtio-rng-ccw.args | 5 +-
tests/qemuxml2argvdata/vmcoreinfo.args | 5 +-
tests/qemuxml2argvtest.c | 14 +-
...k-nvme.xml => disk-nvme.x86_64-latest.xml} | 0
...=> encrypted-disk-usage.x86_64-latest.xml} | 0
...k.xml => encrypted-disk.x86_64-latest.xml} | 5 +-
...ses.xml => user-aliases.x86_64-latest.xml} | 0
tests/qemuxml2xmltest.c | 15 +-
358 files changed, 1924 insertions(+), 8440 deletions(-)
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-basic-blockstats.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-basic-named-nodes.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-basic.result
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-blockjob-blockstats.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-blockjob-named-nodes.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-blockjob.result
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-empty-blockstats.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-empty-named-nodes.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-empty.result
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster-blockstats.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster-named-nodes.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.result
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-iscsi-blockstats.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-iscsi-named-nodes.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-iscsi.result
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-luks-blockstats.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-luks-named-nodes.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-luks.result
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-old-blockstats.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-old-named-nodes.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-old.result
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-relative-blockstats.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-relative-named-nodes.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-relative.result
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing-blockstats.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing-named-nodes.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing.result
delete mode 100644 tests/qemuxml2argvdata/user-aliases-usb.args
create mode 100644 tests/qemuxml2argvdata/user-aliases-usb.x86_64-latest.args
delete mode 100644 tests/qemuxml2argvdata/user-aliases.args
create mode 100644 tests/qemuxml2argvdata/user-aliases.x86_64-latest.args
delete mode 120000 tests/qemuxml2argvdata/user-aliases2.args
create mode 100644 tests/qemuxml2argvdata/user-aliases2.x86_64-latest.args
rename tests/qemuxml2xmloutdata/{disk-nvme.xml => disk-nvme.x86_64-latest.xml} (100%)
rename tests/qemuxml2xmloutdata/{encrypted-disk-usage.xml => encrypted-disk-usage.x86_64-latest.xml} (100%)
rename tests/qemuxml2xmloutdata/{encrypted-disk.xml => encrypted-disk.x86_64-latest.xml} (89%)
rename tests/qemuxml2xmloutdata/{user-aliases.xml => user-aliases.x86_64-latest.xml} (100%)
--
2.36.1
2 years, 3 months
[PATCH] remote: Make remote_daemon depend on qemu_protocol.h
by He Zhe
We sometimes meet the following parallel compililation issue, since
remote_daemon depends on remote_protocol.h qemu_protocol.h and lxc_protocol.h,
which are usually generated due to remote_driver .
| FAILED: src/virtnetworkd.p/remote_remote_daemon_dispatch.c.o
| x86_64-wrs-linux-gcc ...
| In file included from ../libvirt-8.1.0/src/remote/remote_daemon_dispatch.c:26:
| ../libvirt-8.1.0/src/remote/remote_daemon.h:30:10: fatal error: qemu_protocol.h: No such file or directory
| 30 | #include "qemu_protocol.h"
| | ^~~~~~~~~~~~~~~~~
| compilation terminated.
This patch adds the headers as dependencies of remote_daemon to make sure they
are always in place in advance.
Signed-off-by: He Zhe <zhe.he(a)windriver.com>
---
src/remote/meson.build | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/remote/meson.build b/src/remote/meson.build
index eb4f7a0068..04525fb4a6 100644
--- a/src/remote/meson.build
+++ b/src/remote/meson.build
@@ -5,6 +5,15 @@ remote_driver_sources = [
remote_driver_generated = []
+remote_daemon_sources = files(
+ 'remote_daemon.c',
+ 'remote_daemon_config.c',
+ 'remote_daemon_dispatch.c',
+ 'remote_daemon_stream.c',
+)
+
+remote_daemon_generated = []
+
foreach name : [ 'remote', 'qemu', 'lxc' ]
client_bodies_h = '@0(a)_client_bodies.h'.format(name)
protocol_c = '@0(a)_protocol.c'.format(name)
@@ -21,7 +30,7 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
capture: true,
)
- remote_driver_generated += custom_target(
+ protocol_h_generated = custom_target(
protocol_h,
input: protocol_x,
output: protocol_h,
@@ -30,6 +39,9 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
],
)
+ remote_driver_generated += protocol_h_generated
+ remote_daemon_generated += protocol_h_generated
+
remote_driver_generated += custom_target(
protocol_c,
input: protocol_x,
@@ -42,15 +54,6 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
rpc_probe_files += files(protocol_x)
endforeach
-remote_daemon_sources = files(
- 'remote_daemon.c',
- 'remote_daemon_config.c',
- 'remote_daemon_dispatch.c',
- 'remote_daemon_stream.c',
-)
-
-remote_daemon_generated = []
-
virt_ssh_helper_sources = files(
'remote_sockets.c',
'remote_ssh_helper.c',
--
2.17.1
2 years, 3 months
[libvirt PATCH] conf: Simplify IOMMU device validation
by Andrea Bolognani
Instead of duplicating the list of attributes that are not
allowed for some of the IOMMU models, use two separate switch
statements: one for the attributes and one for the address.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/conf/domain_validate.c | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
index 88205c64e0..1c78a3d31c 100644
--- a/src/conf/domain_validate.c
+++ b/src/conf/domain_validate.c
@@ -2633,6 +2633,7 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu)
{
switch (iommu->model) {
case VIR_DOMAIN_IOMMU_MODEL_SMMUV3:
+ case VIR_DOMAIN_IOMMU_MODEL_VIRTIO:
if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT ||
iommu->caching_mode != VIR_TRISTATE_SWITCH_ABSENT ||
iommu->eim != VIR_TRISTATE_SWITCH_ABSENT ||
@@ -2643,8 +2644,15 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu)
virDomainIOMMUModelTypeToString(iommu->model));
return -1;
}
- G_GNUC_FALLTHROUGH;
+ break;
+ case VIR_DOMAIN_IOMMU_MODEL_INTEL:
+ case VIR_DOMAIN_IOMMU_MODEL_LAST:
+ break;
+ }
+
+ switch (iommu->model) {
+ case VIR_DOMAIN_IOMMU_MODEL_SMMUV3:
case VIR_DOMAIN_IOMMU_MODEL_INTEL:
if (iommu->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
virReportError(VIR_ERR_XML_ERROR,
@@ -2655,18 +2663,6 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu)
break;
case VIR_DOMAIN_IOMMU_MODEL_VIRTIO:
- if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT ||
- iommu->caching_mode != VIR_TRISTATE_SWITCH_ABSENT ||
- iommu->eim != VIR_TRISTATE_SWITCH_ABSENT ||
- iommu->iotlb != VIR_TRISTATE_SWITCH_ABSENT ||
- iommu->aw_bits != 0) {
- virReportError(VIR_ERR_XML_ERROR,
- _("iommu model '%s' doesn't support additional attributes"),
- virDomainIOMMUModelTypeToString(iommu->model));
- return -1;
- }
- break;
-
case VIR_DOMAIN_IOMMU_MODEL_LAST:
break;
}
--
2.37.1
2 years, 3 months
[PATCH v2 0/7] qemu: remove support for query-cpus
by Paolo Bonzini
The query-cpus-fast command was introduced in 2.12, therefore query-cpus
is never used on supported versions of QEMU. Remove the logic to parse
its output, as well as the parameters to choose between the two commands.
Since most tests were still mocking the query-cpus command, the expected
results of QEMU monitor commands have to be converted as well.
Thanks,
Paolo
v1->v2: do not query capability, regenerate test output [Peter]
hopefully patch 3/7 is not mangled [Pavel]
Paolo Bonzini (7):
tests: remove duplicate cpuinfo test
tests: drop "-fast" from query-cpus-fast tests
tests: convert ppc64 tests to query-cpus-fast
tests: convert x86_64 tests to query-cpus-fast
tests: remove query-cpus tests
qemu: remove support for query-cpus
qemu: deprecate query-cpus-fast capability
src/qemu/qemu_capabilities.c | 1 -
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_domain.c | 22 +-
src/qemu/qemu_monitor.c | 29 +-
src/qemu/qemu_monitor.h | 6 +-
src/qemu/qemu_monitor_json.c | 44 +--
src/qemu/qemu_monitor_json.h | 3 +-
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 -
.../caps_3.1.0.x86_64.xml | 1 -
.../caps_4.0.0.aarch64.xml | 1 -
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 -
.../caps_4.0.0.riscv32.xml | 1 -
.../caps_4.0.0.riscv64.xml | 1 -
.../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 -
.../caps_4.0.0.x86_64.xml | 1 -
.../caps_4.1.0.x86_64.xml | 1 -
.../caps_4.2.0.aarch64.xml | 1 -
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 -
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 -
.../caps_4.2.0.x86_64.xml | 1 -
.../caps_5.0.0.aarch64.xml | 1 -
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 -
.../caps_5.0.0.riscv64.xml | 1 -
.../caps_5.0.0.x86_64.xml | 1 -
.../qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 -
.../caps_5.1.0.x86_64.xml | 1 -
.../caps_5.2.0.aarch64.xml | 1 -
.../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 -
.../caps_5.2.0.riscv64.xml | 1 -
.../qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 -
.../caps_5.2.0.x86_64.xml | 1 -
.../caps_6.0.0.aarch64.xml | 1 -
.../qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 -
.../caps_6.0.0.x86_64.xml | 1 -
.../caps_6.1.0.x86_64.xml | 1 -
.../caps_6.2.0.aarch64.xml | 1 -
.../qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 -
.../caps_6.2.0.x86_64.xml | 1 -
.../caps_7.0.0.aarch64.xml | 1 -
.../qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 -
.../caps_7.0.0.x86_64.xml | 1 -
.../caps_7.1.0.x86_64.xml | 1 -
tests/qemuhotplugtest.c | 2 -
...umonitorjson-cpuinfo-ppc64-basic-cpus.json | 64 ++---
...itorjson-cpuinfo-ppc64-hotplug-1-cpus.json | 176 ++++++------
...itorjson-cpuinfo-ppc64-hotplug-2-cpus.json | 264 ++++++++++--------
...itorjson-cpuinfo-ppc64-hotplug-4-cpus.json | 264 ++++++++++--------
...mumonitorjson-cpuinfo-ppc64-hotplug-4.data | 8 -
...torjson-cpuinfo-ppc64-no-threads-cpus.json | 88 +++---
...=> qemumonitorjson-cpuinfo-s390-cpus.json} | 0
...qemumonitorjson-cpuinfo-s390-hotplug.json} | 0
...data => qemumonitorjson-cpuinfo-s390.data} | 0
...json-cpuinfo-x86-basic-pluggable-cpus.json | 65 +++--
...nitorjson-cpuinfo-x86-basic-pluggable.data | 5 -
...qemumonitorjson-cpuinfo-x86-full-cpus.json | 154 +++++-----
...onitorjson-cpuinfo-x86-full-fast-cpus.json | 126 ---------
...torjson-cpuinfo-x86-full-fast-hotplug.json | 115 --------
...qemumonitorjson-cpuinfo-x86-full-fast.data | 109 --------
...onitorjson-cpuinfo-x86-node-full-cpus.json | 16 +-
...qemumonitorjson-cpuinfo-x86-node-full.data | 2 -
tests/qemumonitorjsontest.c | 102 +------
61 files changed, 626 insertions(+), 1076 deletions(-)
rename tests/qemumonitorjsondata/{qemumonitorjson-cpuinfo-s390-fast-cpus.json => qemumonitorjson-cpuinfo-s390-cpus.json} (100%)
rename tests/qemumonitorjsondata/{qemumonitorjson-cpuinfo-s390-fast-hotplug.json => qemumonitorjson-cpuinfo-s390-hotplug.json} (100%)
rename tests/qemumonitorjsondata/{qemumonitorjson-cpuinfo-s390-fast.data => qemumonitorjson-cpuinfo-s390.data} (100%)
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-cpus.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-hotplug.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast.data
--
2.37.1
2 years, 3 months
[PATCH 0/7] qemu: remove support for query-cpus
by Paolo Bonzini
The query-cpus-fast command was introduced in 2.12, therefore query-cpus
is never used on supported versions of QEMU. Remove the logic to parse
its output, as well as the parameters to choose between the two commands.
Since most tests were still mocking the query-cpus command, the expected
results of QEMU monitor commands have to be converted as well.
Thanks,
Paolo
Paolo Bonzini (7):
tests: remove duplicate cpuinfo test
tests: drop "-fast" from query-cpus-fast tests
tests: convert ppc64 tests to query-cpus-fast
tests: convert x86_64 tests to query-cpus-fast
tests: remove query-cpus tests
qemu: remove support for query-cpus
qemu: deprecate query-cpus-fast capability
src/qemu/qemu_capabilities.c | 4 +-
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_domain.c | 22 +-
src/qemu/qemu_monitor.c | 29 +-
src/qemu/qemu_monitor.h | 6 +-
src/qemu/qemu_monitor_json.c | 44 +--
src/qemu/qemu_monitor_json.h | 3 +-
tests/qemuhotplugtest.c | 2 -
...umonitorjson-cpuinfo-ppc64-basic-cpus.json | 64 ++---
...itorjson-cpuinfo-ppc64-hotplug-1-cpus.json | 176 ++++++------
...itorjson-cpuinfo-ppc64-hotplug-2-cpus.json | 264 ++++++++++--------
...itorjson-cpuinfo-ppc64-hotplug-4-cpus.json | 264 ++++++++++--------
...mumonitorjson-cpuinfo-ppc64-hotplug-4.data | 8 -
...torjson-cpuinfo-ppc64-no-threads-cpus.json | 88 +++---
...=> qemumonitorjson-cpuinfo-s390-cpus.json} | 0
...qemumonitorjson-cpuinfo-s390-hotplug.json} | 0
...data => qemumonitorjson-cpuinfo-s390.data} | 0
...json-cpuinfo-x86-basic-pluggable-cpus.json | 65 +++--
...nitorjson-cpuinfo-x86-basic-pluggable.data | 5 -
...qemumonitorjson-cpuinfo-x86-full-cpus.json | 154 +++++-----
...onitorjson-cpuinfo-x86-full-fast-cpus.json | 126 ---------
...torjson-cpuinfo-x86-full-fast-hotplug.json | 115 --------
...qemumonitorjson-cpuinfo-x86-full-fast.data | 109 --------
...onitorjson-cpuinfo-x86-node-full-cpus.json | 16 +-
...qemumonitorjson-cpuinfo-x86-node-full.data | 2 -
tests/qemumonitorjsontest.c | 102 +------
26 files changed, 628 insertions(+), 1042 deletions(-)
rename tests/qemumonitorjsondata/{qemumonitorjson-cpuinfo-s390-fast-cpus.json => qemumonitorjson-cpuinfo-s390-cpus.json} (100%)
rename tests/qemumonitorjsondata/{qemumonitorjson-cpuinfo-s390-fast-hotplug.json => qemumonitorjson-cpuinfo-s390-hotplug.json} (100%)
rename tests/qemumonitorjsondata/{qemumonitorjson-cpuinfo-s390-fast.data => qemumonitorjson-cpuinfo-s390.data} (100%)
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-cpus.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-hotplug.json
delete mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast.data
--
2.37.1
2 years, 3 months
[PATCH] conf: Check IOMMU for unsupported attributes
by Michal Privoznik
Currently, it's possible to pass various attributes to an IOMMU's
<driver/> element hoping that we enable them in underlying
hypervisor. However, depending on the IOMMU model, some of these
attributes can't be enabled and are simply ignored. This is
suboptimal and we should reject such configuration in the
validate phase.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2101633
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/domain_validate.c | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
index d4d72037d5..88205c64e0 100644
--- a/src/conf/domain_validate.c
+++ b/src/conf/domain_validate.c
@@ -2632,8 +2632,20 @@ static int
virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu)
{
switch (iommu->model) {
- case VIR_DOMAIN_IOMMU_MODEL_INTEL:
case VIR_DOMAIN_IOMMU_MODEL_SMMUV3:
+ if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT ||
+ iommu->caching_mode != VIR_TRISTATE_SWITCH_ABSENT ||
+ iommu->eim != VIR_TRISTATE_SWITCH_ABSENT ||
+ iommu->iotlb != VIR_TRISTATE_SWITCH_ABSENT ||
+ iommu->aw_bits != 0) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("iommu model '%s' doesn't support additional attributes"),
+ virDomainIOMMUModelTypeToString(iommu->model));
+ return -1;
+ }
+ G_GNUC_FALLTHROUGH;
+
+ case VIR_DOMAIN_IOMMU_MODEL_INTEL:
if (iommu->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
virReportError(VIR_ERR_XML_ERROR,
_("iommu model '%s' can't have address"),
@@ -2643,6 +2655,18 @@ virDomainIOMMUDefValidate(const virDomainIOMMUDef *iommu)
break;
case VIR_DOMAIN_IOMMU_MODEL_VIRTIO:
+ if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT ||
+ iommu->caching_mode != VIR_TRISTATE_SWITCH_ABSENT ||
+ iommu->eim != VIR_TRISTATE_SWITCH_ABSENT ||
+ iommu->iotlb != VIR_TRISTATE_SWITCH_ABSENT ||
+ iommu->aw_bits != 0) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("iommu model '%s' doesn't support additional attributes"),
+ virDomainIOMMUModelTypeToString(iommu->model));
+ return -1;
+ }
+ break;
+
case VIR_DOMAIN_IOMMU_MODEL_LAST:
break;
}
--
2.35.1
2 years, 3 months
[PATCH] util: basic support for vendor-specific vfio drivers
by Laine Stump
Before a PCI device can be assigned to a guest with VFIO, that device
must be bound to the vfio-pci driver rather than to the device's
normal driver. The vfio-pci driver provides APIs that permit QEMU to
perform all the necessary operations to make the device accessible to
the guest.
There has been kernel work recently to support vendor/device-specific
VFIO drivers that provide the basic vfio-pci driver functionality
while adding support for device-specific operations (for example these
device-specific drivers are planned to support live migration of
certain devices). All that will be needed to make this functionality
available will be to bind the new vendor-specific driver to the device
(rather than the generic vfio-pci driver, which will continue to work
just without the extra functionality).
But until now libvirt has required that all PCI devices being assigned
to a guest with VFIO specifically have the "vfio-pci" driver bound to
the device. So even if the user manually binds a shiny new
vendor-specific driver to the device (and puts "managed='no'" in the
config to prevent libvirt from changing that), libvirt will just fail
during startup of the guest (or during hotplug) because the driver
bound to the device isn't named exactly "vfio-pci".
Fortunately these new vendor/device-specific drivers can be easily
identified as being "vfio-pci + extra stuff" - all that's needed is to
look at the output of the "modinfo $driver_name" command to see if
"vfio_pci" is in the alias list for the driver.
That's what this patch does. When libvirt checks the driver bound to a
device (either to decide if it needs to bind to a different driver or
perform some other operation, or if the current driver is acceptable
as-is), if the driver isn't specifically "vfio-pci", then it will look
at the output of modinfo for the driver that *is* bound to the device;
if modinfo shows vfio_pci as an alias for that device, then we'll
behave as if the driver was exactly "vfio-pci".
The effect of this patch is that users will now be able to pre-setup a
device to be bound to a vendor-specific driver, then put
"managed='no'" in the config and libvirt will allow that driver.
What this patch does *not* do is handle automatically determining the
proper/best vendor-specific driver and binding to it in the case of
"managed='yes'". This will be implemented later when there is a widely
available driver / device combo we can use for testing. This initial
simple patch is just something simple that will permit initial testing
of the new drivers' functionality.
(I personally had to add an extra patch playing with driver names to
my build just to test that everything was working as expected; that's
okay for a patch as simple as this, but wouldn't be acceptable testing
for anything more complex.)
Signed-off-by: Laine Stump <laine(a)redhat.com>
---
meson.build | 1 +
src/hypervisor/virhostdev.c | 26 ++++-------
src/util/virpci.c | 90 ++++++++++++++++++++++++++++++++++---
src/util/virpci.h | 3 ++
4 files changed, 97 insertions(+), 23 deletions(-)
diff --git a/meson.build b/meson.build
index de59b1be9c..9d96eb3ee3 100644
--- a/meson.build
+++ b/meson.build
@@ -822,6 +822,7 @@ optional_programs = [
'iscsiadm',
'mdevctl',
'mm-ctl',
+ 'modinfo',
'modprobe',
'ovs-vsctl',
'pdwtags',
diff --git a/src/hypervisor/virhostdev.c b/src/hypervisor/virhostdev.c
index c0ce867596..15b35fa75e 100644
--- a/src/hypervisor/virhostdev.c
+++ b/src/hypervisor/virhostdev.c
@@ -747,9 +747,8 @@ virHostdevPreparePCIDevicesImpl(virHostdevManager *mgr,
mgr->inactivePCIHostdevs) < 0)
goto reattachdevs;
} else {
- g_autofree char *driverPath = NULL;
- g_autofree char *driverName = NULL;
- int stub;
+ g_autofree char *drvName = NULL;
+ virPCIStubDriver drvType;
/* Unmanaged devices should already have been marked as
* inactive: if that's the case, we can simply move on */
@@ -769,18 +768,14 @@ virHostdevPreparePCIDevicesImpl(virHostdevManager *mgr,
* information about active / inactive device across
* daemon restarts has been implemented */
- if (virPCIDeviceGetDriverPathAndName(pci,
- &driverPath, &driverName) < 0)
+ if (virPCIDeviceGetDriverNameAndType(pci, &drvName, &drvType) < 0)
goto reattachdevs;
- stub = virPCIStubDriverTypeFromString(driverName);
-
- if (stub > VIR_PCI_STUB_DRIVER_NONE &&
- stub < VIR_PCI_STUB_DRIVER_LAST) {
+ if (drvType > VIR_PCI_STUB_DRIVER_NONE) {
/* The device is bound to a known stub driver: store this
* information and add a copy to the inactive list */
- virPCIDeviceSetStubDriver(pci, stub);
+ virPCIDeviceSetStubDriver(pci, drvType);
VIR_DEBUG("Adding PCI device %s to inactive list",
virPCIDeviceGetName(pci));
@@ -2292,18 +2287,13 @@ virHostdevPrepareOneNVMeDevice(virHostdevManager *hostdev_mgr,
/* Let's check if all PCI devices are NVMe disks. */
for (i = 0; i < virPCIDeviceListCount(pciDevices); i++) {
virPCIDevice *pci = virPCIDeviceListGet(pciDevices, i);
- g_autofree char *drvPath = NULL;
g_autofree char *drvName = NULL;
- int stub = VIR_PCI_STUB_DRIVER_NONE;
+ virPCIStubDriver drvType;
- if (virPCIDeviceGetDriverPathAndName(pci, &drvPath, &drvName) < 0)
+ if (virPCIDeviceGetDriverNameAndType(pci, &drvName, &drvType) < 0)
goto cleanup;
- if (drvName)
- stub = virPCIStubDriverTypeFromString(drvName);
-
- if (stub == VIR_PCI_STUB_DRIVER_VFIO ||
- STREQ_NULLABLE(drvName, "nvme"))
+ if (drvType == VIR_PCI_STUB_DRIVER_VFIO || STREQ_NULLABLE(drvName, "nvme"))
continue;
VIR_WARN("Suspicious NVMe disk assignment. PCI device "
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 7800966963..8b714d3ddc 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -37,6 +37,7 @@
#include "virstring.h"
#include "viralloc.h"
#include "virpcivpd.h"
+#include "vircommand.h"
VIR_LOG_INIT("util.pci");
@@ -277,6 +278,84 @@ virPCIDeviceGetDriverPathAndName(virPCIDevice *dev, char **path, char **name)
}
+/**
+ * virPCIDeviceGetDriverNameAndType:
+ * @dev: virPCIDevice object to examine
+ * @drvName: returns name of driver bound to this device (if any)
+ * @drvType: returns type of driver if it is a known stub driver type
+ *
+ * Find the name of the driver bound to @dev (if any) and the type of
+ * the driver if it is a known/recognized "stub" driver (based on the
+ * name). If the name doesn't match one of the virPCIStubDrivers
+ * exactly, check the output of "modinfo vfio-pci" to see if
+ * "vfio_pci" is included in the driver's list of aliases; if so, then
+ * this driver has all the functionality of the basic vfio_pci driver,
+ * so it should be considered of the type VIR_PCI_STUB_DRIVER_VFIO.
+ *
+ * Return 0 on success, -1 on failure. If -1 is returned, then an error
+ * message has been logged.
+ */
+int
+virPCIDeviceGetDriverNameAndType(virPCIDevice *dev,
+ char **drvName,
+ virPCIStubDriver *drvType)
+{
+ g_autofree char *drvPath = NULL;
+ g_autoptr(virCommand) cmd = NULL;
+ g_autofree char *output = NULL;
+ g_autoptr(GRegex) regex = NULL;
+ g_autoptr(GError) err = NULL;
+ g_autoptr(GMatchInfo) info = NULL;
+ int exit;
+ int tmpType;
+
+ if (virPCIDeviceGetDriverPathAndName(dev, &drvPath, drvName) < 0)
+ return -1;
+
+ if (!*drvName) {
+ *drvType = VIR_PCI_STUB_DRIVER_NONE;
+ return 0;
+ }
+
+ tmpType = virPCIStubDriverTypeFromString(*drvName);
+
+ if (tmpType > VIR_PCI_STUB_DRIVER_NONE) {
+ *drvType = tmpType;
+ return 0; /* exact match of a known driver name (or no name) */
+ }
+
+ /* Check the output of "modinfo $drvName" to see if it has
+ * "vfio_pci" as an alias. If it does, then this driver should
+ * also be considered as a vfio-pci driver, because it implements
+ * all the functionality of the basic vfio-pci (plus additional
+ * device-specific stuff).
+ */
+
+ cmd = virCommandNewArgList(MODINFO, *drvName, NULL);
+ virCommandSetOutputBuffer(cmd, &output);
+ if (virCommandRun(cmd, &exit) < 0)
+ return -1;
+
+ regex = g_regex_new("^alias: +vfio_pci:", G_REGEX_MULTILINE, 0, &err);
+ if (!regex) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Failed to compile regex %s"), err->message);
+ return -1;
+ }
+
+ g_regex_match(regex, output, 0, &info);
+ if (g_match_info_matches(info)) {
+ VIR_DEBUG("Driver %s is a vfio_pci driver", *drvName);
+ *drvType = VIR_PCI_STUB_DRIVER_VFIO;
+ } else {
+ VIR_DEBUG("Driver %s is NOT a vfio_pci driver", *drvName);
+ *drvType = VIR_PCI_STUB_DRIVER_NONE;
+ }
+
+ return 0;
+}
+
+
static int
virPCIDeviceConfigOpenInternal(virPCIDevice *dev, bool readonly, bool fatal)
{
@@ -1004,8 +1083,8 @@ virPCIDeviceReset(virPCIDevice *dev,
virPCIDeviceList *activeDevs,
virPCIDeviceList *inactiveDevs)
{
- g_autofree char *drvPath = NULL;
g_autofree char *drvName = NULL;
+ virPCIStubDriver drvType;
int ret = -1;
int fd = -1;
int hdrType = -1;
@@ -1032,15 +1111,16 @@ virPCIDeviceReset(virPCIDevice *dev,
* reset it whenever appropriate, so doing it ourselves would just
* be redundant.
*/
- if (virPCIDeviceGetDriverPathAndName(dev, &drvPath, &drvName) < 0)
+ if (virPCIDeviceGetDriverNameAndType(dev, &drvName, &drvType) < 0)
goto cleanup;
- if (virPCIStubDriverTypeFromString(drvName) == VIR_PCI_STUB_DRIVER_VFIO) {
- VIR_DEBUG("Device %s is bound to vfio-pci - skip reset",
- dev->name);
+ if (drvType == VIR_PCI_STUB_DRIVER_VFIO) {
+
+ VIR_DEBUG("Device %s is bound to %s - skip reset", dev->name, drvName);
ret = 0;
goto cleanup;
}
+
VIR_DEBUG("Resetting device %s", dev->name);
if ((fd = virPCIDeviceConfigOpenWrite(dev)) < 0)
diff --git a/src/util/virpci.h b/src/util/virpci.h
index 4d9193f24e..0532b90f90 100644
--- a/src/util/virpci.h
+++ b/src/util/virpci.h
@@ -280,6 +280,9 @@ int virPCIDeviceRebind(virPCIDevice *dev);
int virPCIDeviceGetDriverPathAndName(virPCIDevice *dev,
char **path,
char **name);
+int virPCIDeviceGetDriverNameAndType(virPCIDevice *dev,
+ char **drvName,
+ virPCIStubDriver *drvType);
int virPCIDeviceIsPCIExpress(virPCIDevice *dev);
int virPCIDeviceHasPCIExpressLink(virPCIDevice *dev);
--
2.35.3
2 years, 3 months
[PATCH] news: qemu: Add support for zero-copy migration
by Fangge Jin
Signed-off-by: Fangge Jin <fjin(a)redhat.com>
---
NEWS.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 79aad652e8..0eb3299e3b 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -42,6 +42,11 @@ v8.5.0 (2022-07-01)
A new ``VIR_MIGRATE_POSTCOPY_RESUME`` flag (``virsh migrate --postcopy-resume``)
was introduced for recovering from a failed post-copy migration.
+ * qemu: Add support for zero-copy migration
+
+ With QEMU 7.1.0, libvirt can enable zerocopy for parallel migration. This is
+ implmented by adding a new ``VIR_MIGRATE_ZEROCOPY`` flag(``virsh migrate --zerocopy``).
+
* Introduce thread_pool_min and thread_pool_max attributes to IOThread
New attributes ``thread_pool_min`` and ``thread_pool_max`` were introduced
--
2.31.1
2 years, 3 months
[PATCH 00/11] qemu & hypervisor: move helper job functions
by Kristina Hanicova
This series moves helper functions from qemu so that they can be used by
other hypervisors or BeginJob / EndJob functions which will be
generalized and moved in one of the following series as well.
Kristina Hanicova (11):
qemu & hypervisor: move qemuDomainObjResetAgentJob() into hypervisor
qemu & hypervisor: move qemuDomainObjResetAsyncJob() into hypervisor
qemu: propagate virDomainJobObj into qemuDomainObjPreserveJob()
qemu & hypervisor: move qemuDomainObjPreserveJob() into hypervisor
qemu & hypervisor: move qemuDomainObjClearJob() into hypervisor
libxl: use virDomainObjClearJob() instead of libxlDomainObjFreeJob()
LXC: use virDomainObjClearJob() instead of virLXCDomainObjFreeJob()
CH: use virDomainObjClearJob() instead of virCHDomainObjFreeJob()
qemu & hypervisor: move qemuDomainTrackJob() into hypervisor
qemu: move virDomainNestedJobAllowed into hypervisor
qemu: move virDomainObjCanSetJob() into hypervisor
src/ch/ch_domain.c | 10 +--
src/hypervisor/domain_job.c | 99 +++++++++++++++++++++++++++
src/hypervisor/domain_job.h | 18 +++++
src/libvirt_private.syms | 7 ++
src/libxl/libxl_domain.c | 9 +--
src/lxc/lxc_domain.c | 7 +-
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_domainjob.c | 129 ++++--------------------------------
src/qemu/qemu_domainjob.h | 7 --
src/qemu/qemu_process.c | 2 +-
10 files changed, 142 insertions(+), 148 deletions(-)
--
2.37.1
2 years, 3 months
[PULL 0/6] Misc next patches
by Daniel P. Berrangé
The following changes since commit 09ed077d7fae5f825e18ff9a2004dcdd1b165edb:
Merge tag 'trivial-branch-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2022-08-04 17:21:13 -0700)
are available in the Git repository at:
https://gitlab.com/berrange/qemu tags/misc-next-pull-request
for you to fetch changes up to e3fdb13e8851be570db41a50589ce82d11d61c12:
util/qemu-sockets: Replace the call to close a socket with closesocket() (2022-08-05 16:18:15 +0100)
----------------------------------------------------------------
Merge misc patches
* Display deprecation warnings in -cpu help
* Fix zerocopy IPv6 handling
* Clarify platform support policy on minor release/backports
* Fix closesocket call in error path
----------------------------------------------------------------
Andrea Bolognani (1):
docs: build-platforms: Clarify stance on minor releases and backports
Bin Meng (1):
util/qemu-sockets: Replace the call to close a socket with
closesocket()
Daniel P. Berrangé (3):
target/i386: display deprecation status in '-cpu help'
target/s390x: display deprecation status in '-cpu help'
target/arm: display deprecation status in '-cpu help'
Leonardo Bras (1):
QIOChannelSocket: Add support for MSG_ZEROCOPY + IPV6
docs/about/build-platforms.rst | 5 ++++-
io/channel-socket.c | 4 ++--
target/arm/helper.c | 7 ++++++-
target/i386/cpu.c | 5 +++++
target/s390x/cpu_models.c | 23 ++++++++++++++++++-----
util/qemu-sockets.c | 4 ++--
6 files changed, 37 insertions(+), 11 deletions(-)
--
2.37.1
2 years, 3 months