From: Hyman <huangy81@xxxxxxxxxxxxxxx> The v5 of Dirty Ring correct the mistake introduced in v3 patch. Which using the shell script to modify the hundereds of test cases in qemuxml2argvdata directory, and do not take the symlink into account. The following is detail: https://www.redhat.com/archives/libvir-list/2021-January/msg00645.html So the modification just drop the first patch in v4 patchset and skip the disk-backing-chains-index.x86_64-latest.args when modifying. Just modify the disk-backing-chains-noindex.x86_64-latest.args that the former file link to only. The v4 of Dirty Ring just fix args file in testsuite which has 'No-newline-at-end-of-file' and make it a stand-alone patch. The following is detail: https://www.redhat.com/archives/libvir-list/2021-January/msg00626.html The v3 of Dirty Ring do some modification based on the following discussion: https://www.redhat.com/archives/libvir-list/2021-January/msg00531.html https://www.redhat.com/archives/libvir-list/2021-January/msg00520.html modification 1: introducing the QEMU_CAPS_ACCEL so that we can use it to choose the right option cause -accel option only supported by QEMU with version >= 2.9.0. modification 2: splitting the qemuBuildAccelCommandLine function separation from the actual functional changes to make it easier to see what's going on. modification 3: update the libvirt version to 7.0.0 in docs The v2 of Dirty ring support of Libvirt just and an empty function of 'qemuBuildAccelCommandLineTcgOptions' and do some code clen, if things go smoothly, the tcg accelerator property may be support in the future, this empty function give a hint to do that. This is v1 of Dirty ring support of Libvirt. It is merely the same as v0, but fix the parameter dirty-gfn-count passed to QEMU command line. A previous implementation was patched by me mistakenly. This series of patches is a supplement of dirty ring implementation for Libvirt: https://lore.kernel.org/qemu-devel/20210108165050.406906-10-peterx@xxxxxxxxxx/ Since QEMU enable the dirty ring feature by specifying the "-accel" sub-parameter. Libvirt use "-machine accel=xxx" option to specify the type of accelerator by default, which is conflict with QEMU. Either the Libvirt or QEMU may compromise, According to the Paolo Bonzini's patient and prompt explanation: https://lore.kernel.org/qemu-devel/3aa73987-40e8-3619-0723-9f17f73850bd@xxxxxxxxxx/ We'd like to have Libvirt switch to "-accel xxx" instead, cause the "-machine" options for accelerator are legacy and now there is a better mechanism. The 3 patches do the following thing: 1. introduce QEMU_CAPS_ACCEL so the the next patch can use it to choose the right option when specifying the accelerator type. 2. switch the option "-machine accel=xxx" to "-accel xxx" when specifying accelerator type once libvirt build QEMU command line, so that the next patch can build QEMU command line for accelerator type using "-accel xxx" directly. 3. introduce a dirty ring size, which is bonding to the kvm feature. Though the dirty ring is per-cpu logically, the number of GFNs per ring is registered by 'struct kvm' in QEMU. So We'd like to place the dirty ring size as a property of vm in Libvirt like the QEMU do. The dirty ring feature is disabled by default Like the QEMU. The key point of this patches i think is the placement of dirty ring size, whether there is a better placement for dirty ring size may be discussable. Since we have Libvirt change the way to specify the type of accelerator, more property of accelerator can be specified by Libvirt which has not been implemented yet, like the "kvm-shadow-mem", "tb-size", etc, whether to perfect that implementation is also a topic. Please review, Thanks! Best Regards ! Hyman (3): qemu_capabilities: Introduce QEMU_CAPS_ACCEL qemu: use "-accel" option to specify accelerator instead of "-machine" qemu: suppor dirty ring feature docs/formatdomain.rst | 16 +- docs/schemas/domaincommon.rng | 10 ++ src/conf/domain_conf.c | 34 +++++ src/conf/domain_conf.h | 4 + src/qemu/qemu_capabilities.c | 2 + src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 138 ++++++++++++++---- .../caps_2.10.0.aarch64.xml | 1 + .../caps_2.10.0.ppc64.xml | 1 + .../caps_2.10.0.s390x.xml | 1 + .../caps_2.10.0.x86_64.xml | 1 + .../caps_2.11.0.s390x.xml | 1 + .../caps_2.11.0.x86_64.xml | 1 + .../caps_2.12.0.aarch64.xml | 1 + .../caps_2.12.0.ppc64.xml | 1 + .../caps_2.12.0.s390x.xml | 1 + .../caps_2.12.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 1 + .../qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 + .../caps_2.9.0.x86_64.xml | 1 + .../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 + .../caps_3.0.0.riscv32.xml | 1 + .../caps_3.0.0.riscv64.xml | 1 + .../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 + .../caps_3.0.0.x86_64.xml | 1 + .../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 + ...fault-cpu-kvm-virt-4.2.aarch64-latest.args | 3 +- ...fault-cpu-tcg-virt-4.2.aarch64-latest.args | 3 +- .../aarch64-features-sve.aarch64-latest.args | 3 +- ...arch64-os-firmware-efi.aarch64-latest.args | 3 +- .../aarch64-virt-graphics.aarch64-latest.args | 3 +- .../aarch64-virt-headless.aarch64-latest.args | 3 +- .../blkdeviotune-group-num.x86_64-4.1.0.args | 3 +- .../blkdeviotune-group-num.x86_64-latest.args | 3 +- .../blkdeviotune-max-length.x86_64-4.1.0.args | 3 +- ...blkdeviotune-max-length.x86_64-latest.args | 3 +- .../blkdeviotune-max.x86_64-4.1.0.args | 3 +- .../blkdeviotune-max.x86_64-latest.args | 3 +- .../channel-unix-guestfwd.x86_64-latest.args | 3 +- .../clock-timer-armvtimer.aarch64-latest.args | 3 +- .../console-virtio-unix.x86_64-latest.args | 3 +- .../controller-virtio-scsi.x86_64-latest.args | 3 +- ...u-Icelake-Server-pconfig.x86_64-3.1.0.args | 3 +- ...-Icelake-Server-pconfig.x86_64-latest.args | 3 +- .../cpu-host-model-cmt.x86_64-4.0.0.args | 3 +- .../cpu-translation.x86_64-4.0.0.args | 3 +- .../cpu-translation.x86_64-latest.args | 3 +- .../cpu-tsc-frequency.x86_64-4.0.0.args | 3 +- .../cpu-tsc-high-frequency.x86_64-latest.args | 3 +- .../cputune-cpuset-big-id.x86_64-latest.args | 3 +- ...ult-video-type-aarch64.aarch64-latest.args | 3 +- ...default-video-type-ppc64.ppc64-latest.args | 3 +- ...ult-video-type-riscv64.riscv64-latest.args | 3 +- ...default-video-type-s390x.s390x-latest.args | 3 +- .../disk-aio-io_uring.x86_64-latest.args | 3 +- .../disk-aio.x86_64-2.12.0.args | 3 +- .../disk-aio.x86_64-latest.args | 3 +- .../disk-arm-virtio-sd.aarch64-4.0.0.args | 3 +- .../disk-arm-virtio-sd.aarch64-latest.args | 3 +- ...-backing-chains-noindex.x86_64-2.12.0.args | 3 +- ...-backing-chains-noindex.x86_64-latest.args | 3 +- .../disk-cache.x86_64-2.12.0.args | 3 +- .../disk-cache.x86_64-latest.args | 3 +- .../disk-cdrom-bus-other.x86_64-latest.args | 3 +- ...m-empty-network-invalid.x86_64-latest.args | 3 +- .../disk-cdrom-network.x86_64-2.12.0.args | 3 +- .../disk-cdrom-network.x86_64-latest.args | 3 +- .../disk-cdrom-tray.x86_64-2.12.0.args | 3 +- .../disk-cdrom-tray.x86_64-latest.args | 3 +- .../disk-cdrom.x86_64-2.12.0.args | 3 +- .../disk-cdrom.x86_64-latest.args | 3 +- .../disk-copy_on_read.x86_64-2.12.0.args | 3 +- .../disk-copy_on_read.x86_64-latest.args | 3 +- .../disk-detect-zeroes.x86_64-2.12.0.args | 3 +- .../disk-detect-zeroes.x86_64-latest.args | 3 +- .../disk-discard.x86_64-4.1.0.args | 3 +- .../disk-discard.x86_64-latest.args | 3 +- .../disk-error-policy-s390x.s390x-2.12.0.args | 3 +- .../disk-error-policy-s390x.s390x-latest.args | 3 +- .../disk-error-policy.x86_64-2.12.0.args | 3 +- .../disk-error-policy.x86_64-latest.args | 3 +- .../disk-floppy-q35-2_11.x86_64-2.12.0.args | 3 +- .../disk-floppy-q35-2_11.x86_64-latest.args | 3 +- .../disk-floppy-q35-2_9.x86_64-2.12.0.args | 3 +- .../disk-floppy-q35-2_9.x86_64-latest.args | 3 +- .../disk-floppy.x86_64-2.12.0.args | 3 +- .../disk-floppy.x86_64-latest.args | 3 +- .../disk-metadata-cache.x86_64-latest.args | 3 +- .../disk-network-gluster.x86_64-2.12.0.args | 3 +- .../disk-network-gluster.x86_64-latest.args | 3 +- .../disk-network-http.x86_64-latest.args | 3 +- .../disk-network-iscsi.x86_64-2.12.0.args | 3 +- .../disk-network-iscsi.x86_64-latest.args | 3 +- .../disk-network-nbd.x86_64-2.12.0.args | 3 +- .../disk-network-nbd.x86_64-latest.args | 3 +- .../disk-network-nfs.x86_64-latest.args | 3 +- .../disk-network-rbd.x86_64-2.12.0.args | 3 +- .../disk-network-rbd.x86_64-latest.args | 3 +- .../disk-network-sheepdog.x86_64-2.12.0.args | 3 +- .../disk-network-sheepdog.x86_64-latest.args | 3 +- ...isk-network-source-auth.x86_64-2.12.0.args | 3 +- ...isk-network-source-auth.x86_64-latest.args | 3 +- ...isk-network-tlsx509-nbd.x86_64-2.12.0.args | 3 +- ...isk-network-tlsx509-nbd.x86_64-latest.args | 3 +- ...sk-network-tlsx509-vxhs.x86_64-2.12.0.args | 3 +- ...isk-network-tlsx509-vxhs.x86_64-5.0.0.args | 3 +- .../disk-network-tlsx509.x86_64-2.12.0.args | 3 +- .../disk-network-tlsx509.x86_64-latest.args | 3 +- .../disk-nvme.x86_64-latest.args | 3 +- .../disk-readonly-disk.x86_64-2.12.0.args | 3 +- .../disk-readonly-disk.x86_64-latest.args | 3 +- .../disk-scsi-device-auto.x86_64-latest.args | 3 +- .../disk-scsi.x86_64-latest.args | 3 +- .../disk-shared.x86_64-2.12.0.args | 3 +- .../disk-shared.x86_64-latest.args | 3 +- .../disk-slices.x86_64-latest.args | 3 +- .../disk-transient.x86_64-latest.args | 3 +- ...irtio-scsi-reservations.x86_64-2.12.0.args | 3 +- ...irtio-scsi-reservations.x86_64-latest.args | 3 +- .../eoi-disabled.x86_64-4.0.0.args | 3 +- .../eoi-disabled.x86_64-latest.args | 3 +- .../eoi-enabled.x86_64-4.0.0.args | 3 +- .../eoi-enabled.x86_64-latest.args | 3 +- .../fips-enabled.x86_64-5.1.0.args | 3 +- .../fips-enabled.x86_64-latest.args | 3 +- .../floppy-drive-fat.x86_64-2.12.0.args | 3 +- .../floppy-drive-fat.x86_64-latest.args | 3 +- .../fs9p-ccw.s390x-latest.args | 3 +- .../qemuxml2argvdata/fs9p.x86_64-latest.args | 3 +- .../genid-auto.x86_64-latest.args | 3 +- .../qemuxml2argvdata/genid.x86_64-latest.args | 3 +- ...egl-headless-rendernode.x86_64-latest.args | 3 +- .../graphics-egl-headless.x86_64-latest.args | 3 +- ...pice-gl-auto-rendernode.x86_64-latest.args | 3 +- ...graphics-vnc-tls-secret.x86_64-latest.args | 3 +- .../graphics-vnc-tls.x86_64-latest.args | 3 +- ...tdev-mdev-display-ramfb.x86_64-latest.args | 3 +- ...play-spice-egl-headless.x86_64-latest.args | 3 +- ...ev-display-spice-opengl.x86_64-latest.args | 3 +- ...isplay-vnc-egl-headless.x86_64-latest.args | 3 +- ...ostdev-mdev-display-vnc.x86_64-latest.args | 3 +- .../hostdev-scsi-lsi.x86_64-4.1.0.args | 3 +- .../hostdev-scsi-lsi.x86_64-latest.args | 3 +- ...hostdev-scsi-virtio-scsi.x86_64-4.1.0.args | 3 +- ...ostdev-scsi-virtio-scsi.x86_64-latest.args | 3 +- ...tdev-subsys-mdev-vfio-ap.s390x-latest.args | 3 +- ...ubsys-mdev-vfio-ccw-boot.s390x-latest.args | 3 +- .../hugepages-memaccess3.x86_64-latest.args | 3 +- .../hugepages-nvdimm.x86_64-latest.args | 3 +- .../hyperv-off.x86_64-4.0.0.args | 3 +- .../hyperv-off.x86_64-latest.args | 3 +- .../hyperv-panic.x86_64-4.0.0.args | 3 +- .../hyperv-panic.x86_64-latest.args | 3 +- .../hyperv-stimer-direct.x86_64-latest.args | 3 +- .../qemuxml2argvdata/hyperv.x86_64-4.0.0.args | 3 +- .../hyperv.x86_64-latest.args | 3 +- .../intel-iommu-aw-bits.x86_64-latest.args | 3 +- ...ntel-iommu-caching-mode.x86_64-latest.args | 3 +- ...ntel-iommu-device-iotlb.x86_64-latest.args | 3 +- .../intel-iommu-eim.x86_64-latest.args | 3 +- .../intel-iommu.x86_64-latest.args | 3 +- .../iommu-smmuv3.aarch64-latest.args | 3 +- ...othreads-virtio-scsi-ccw.s390x-latest.args | 3 +- ...threads-virtio-scsi-pci.x86_64-latest.args | 3 +- .../kvmclock+eoi-disabled.x86_64-4.0.0.args | 3 +- .../kvmclock+eoi-disabled.x86_64-latest.args | 3 +- ...v-missing-platform-info.x86_64-2.12.0.args | 3 +- .../launch-security-sev.x86_64-2.12.0.args | 3 +- ...luks-disks-source-qcow2.x86_64-latest.args | 3 +- ...memory-default-hugepage.x86_64-latest.args | 3 +- .../memfd-memory-numa.x86_64-latest.args | 3 +- ...y-hotplug-nvdimm-access.x86_64-latest.args | 3 +- ...ry-hotplug-nvdimm-align.x86_64-latest.args | 3 +- ...ry-hotplug-nvdimm-label.x86_64-latest.args | 3 +- ...ory-hotplug-nvdimm-pmem.x86_64-latest.args | 3 +- ...hotplug-nvdimm-readonly.x86_64-latest.args | 3 +- .../memory-hotplug-nvdimm.x86_64-latest.args | 3 +- .../mlock-off.x86_64-3.0.0.args | 3 +- .../mlock-off.x86_64-latest.args | 3 +- .../mlock-on.x86_64-3.0.0.args | 3 +- .../mlock-on.x86_64-latest.args | 3 +- .../net-user.x86_64-4.0.0.args | 3 +- .../net-vdpa.x86_64-latest.args | 3 +- .../net-vhostuser.x86_64-latest.args | 3 +- .../numatune-hmat.x86_64-latest.args | 3 +- .../os-firmware-bios.x86_64-latest.args | 3 +- ...os-firmware-efi-secboot.x86_64-latest.args | 3 +- .../os-firmware-efi.x86_64-latest.args | 3 +- .../parallel-unix-chardev.x86_64-latest.args | 3 +- ...cie-root-port-nohotplug.x86_64-latest.args | 3 +- ...ault-cpu-kvm-pseries-2.7.ppc64-latest.args | 3 +- ...ault-cpu-kvm-pseries-3.1.ppc64-latest.args | 3 +- ...ault-cpu-kvm-pseries-4.2.ppc64-latest.args | 3 +- ...ault-cpu-tcg-pseries-2.7.ppc64-latest.args | 3 +- ...ault-cpu-tcg-pseries-3.1.ppc64-latest.args | 3 +- ...ault-cpu-tcg-pseries-4.2.ppc64-latest.args | 3 +- .../ppc64-pseries-graphics.ppc64-latest.args | 3 +- .../ppc64-pseries-headless.ppc64-latest.args | 3 +- .../ppc64-tpmproxy-single.ppc64-latest.args | 3 +- .../ppc64-tpmproxy-with-tpm.ppc64-latest.args | 3 +- .../pv-spinlock-disabled.x86_64-4.0.0.args | 3 +- .../pv-spinlock-disabled.x86_64-latest.args | 3 +- .../pv-spinlock-enabled.x86_64-4.0.0.args | 3 +- .../pv-spinlock-enabled.x86_64-latest.args | 3 +- .../qemu-ns.x86_64-4.0.0.args | 3 +- .../qemu-ns.x86_64-latest.args | 3 +- .../riscv64-virt-graphics.riscv64-latest.args | 3 +- .../riscv64-virt-headless.riscv64-latest.args | 3 +- ...t-cpu-kvm-ccw-virtio-2.7.s390x-latest.args | 3 +- ...t-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 3 +- ...t-cpu-tcg-ccw-virtio-2.7.s390x-latest.args | 3 +- ...t-cpu-tcg-ccw-virtio-4.2.s390x-latest.args | 3 +- .../s390x-ccw-graphics.s390x-latest.args | 3 +- .../s390x-ccw-headless.s390x-latest.args | 3 +- .../serial-unix-chardev.x86_64-latest.args | 3 +- ...rtcard-passthrough-unix.x86_64-latest.args | 3 +- .../tpm-emulator-spapr.ppc64-latest.args | 3 +- .../tpm-emulator-tpm2-enc.x86_64-latest.args | 3 +- ...pm-emulator-tpm2-pstate.x86_64-latest.args | 3 +- .../tpm-emulator-tpm2.x86_64-latest.args | 3 +- .../tpm-emulator.x86_64-latest.args | 3 +- .../tpm-passthrough-crb.x86_64-latest.args | 3 +- .../tpm-passthrough.x86_64-latest.args | 3 +- .../tseg-explicit-size.x86_64-latest.args | 3 +- .../usb-redir-unix.x86_64-latest.args | 3 +- ...vhost-user-fs-fd-memory.x86_64-latest.args | 3 +- ...vhost-user-fs-hugepages.x86_64-latest.args | 3 +- ...host-user-gpu-secondary.x86_64-latest.args | 3 +- .../vhost-user-vga.x86_64-latest.args | 3 +- .../vhost-vsock-auto.x86_64-latest.args | 3 +- .../vhost-vsock-ccw-auto.s390x-latest.args | 3 +- .../vhost-vsock-ccw.s390x-latest.args | 3 +- .../vhost-vsock.x86_64-latest.args | 3 +- ...eo-bochs-display-device.x86_64-latest.args | 3 +- ...video-qxl-device-vram64.x86_64-latest.args | 3 +- ...o-qxl-sec-device-vram64.x86_64-latest.args | 3 +- ...eo-ramfb-display-device.x86_64-latest.args | 3 +- .../virtio-9p-createmode.x86_64-latest.args | 3 +- .../virtio-9p-multidevs.x86_64-latest.args | 3 +- .../virtio-non-transitional.x86_64-3.1.0.args | 3 +- ...virtio-non-transitional.x86_64-latest.args | 3 +- ...-options-controller-ats.x86_64-latest.args | 3 +- ...ptions-controller-iommu.x86_64-latest.args | 3 +- ...tions-controller-packed.x86_64-latest.args | 3 +- ...virtio-options-disk-ats.x86_64-latest.args | 3 +- ...rtio-options-disk-iommu.x86_64-latest.args | 3 +- ...tio-options-disk-packed.x86_64-latest.args | 3 +- .../virtio-options-fs-ats.x86_64-latest.args | 3 +- ...virtio-options-fs-iommu.x86_64-latest.args | 3 +- ...irtio-options-fs-packed.x86_64-latest.args | 3 +- ...irtio-options-input-ats.x86_64-latest.args | 3 +- ...tio-options-input-iommu.x86_64-latest.args | 3 +- ...io-options-input-packed.x86_64-latest.args | 3 +- ...-options-memballoon-ats.x86_64-latest.args | 3 +- ...loon-freepage-reporting.x86_64-latest.args | 3 +- ...ptions-memballoon-iommu.x86_64-latest.args | 3 +- ...tions-memballoon-packed.x86_64-latest.args | 3 +- .../virtio-options-net-ats.x86_64-latest.args | 3 +- ...irtio-options-net-iommu.x86_64-latest.args | 3 +- ...rtio-options-net-packed.x86_64-latest.args | 3 +- .../virtio-options-rng-ats.x86_64-latest.args | 3 +- ...irtio-options-rng-iommu.x86_64-latest.args | 3 +- ...rtio-options-rng-packed.x86_64-latest.args | 3 +- ...irtio-options-video-ats.x86_64-latest.args | 3 +- ...tio-options-video-iommu.x86_64-latest.args | 3 +- ...io-options-video-packed.x86_64-latest.args | 3 +- .../virtio-options.x86_64-latest.args | 3 +- .../virtio-rng-builtin.x86_64-latest.args | 3 +- .../virtio-rng-egd-unix.x86_64-latest.args | 3 +- .../virtio-transitional.x86_64-3.1.0.args | 3 +- .../virtio-transitional.x86_64-latest.args | 3 +- ...-default-cpu-kvm-pc-4.2.x86_64-latest.args | 3 +- ...default-cpu-kvm-q35-4.2.x86_64-latest.args | 3 +- ...-default-cpu-tcg-pc-4.2.x86_64-latest.args | 3 +- ...default-cpu-tcg-q35-4.2.x86_64-latest.args | 3 +- .../x86_64-pc-graphics.x86_64-latest.args | 3 +- .../x86_64-pc-headless.x86_64-latest.args | 3 +- .../x86_64-q35-graphics.x86_64-latest.args | 3 +- .../x86_64-q35-headless.x86_64-latest.args | 3 +- 302 files changed, 717 insertions(+), 289 deletions(-) -- 2.24.3