[PATCH v6 0/4] Dirty Ring support (Libvirt)

From: "Hyman Huang(黄勇)" <huangy81@chinatelecom.cn> Ping for this series. I still keep thinking the dirty ring feature is something good to have for libvirt. qemu-6.1 has supported dirty ring feature and followed up with the commit 0e21bf24 "support dirtyrate at the granualrity of vcpu", which is a typical usage scenario of dirty ring. another usage scenario may be the implementation of per-vcpu auto-converge during live migration which is already being reviewed. so we can make full use of dirty ring feature if libvirt supports. and any corrections and comments about this series would be very appreciated. Please review, Thanks! Hyman v6 - rebase on master v5,v4: blank, just make v6 be the the latest version. v3 - rebase master and fix the confilict when apply "conf: introduce dirty_ring_size in struct "_virDomainDef" to current master. v2 - split patchset into 4 patches - leave out the tcg case when building commandline. - handle the VIR_DOMAIN_KVM_DIRTY_RING case independently in , virDomainFeatureDefParse and virDomainDefFeaturesCheckABIStability, do not integrate it with other cases... - add dirty ring size check in virDomainDefFeaturesCheckABIStability - modify zero checks on integers of dirty ring size in a explicit way. - set the default value of dirty ring size in a post-parser callback. - check the absence of kvm_feature in a explicit way. - code clean of virTristateSwitchTypeToString function. this version's modification base on Peter's advices mostly, thanks a lot, please review ! v1 since qemu has introduced a dirty ring feature in 6.1.0, may be it's the right time to introduce dirty ring in libvirt meanwhile. this patch add feature named 'dirty-ring', which enable dirty ring feature when starting vm. to try this out, three things has done in this patchset: - introduce QEMU_CAPS_ACCEL so the the libvirt can use it to select the right option when specifying the accelerator type. - switch the option "-machine accel=xxx" to "-accel xxx" when specifying accelerator type once libvirt build QEMU command line, so that dirty-ring-size property can be passed to qemu when start vm. - introduce dirty_ring_size to hold the ring size configured by user and pass dirty_ring_size when building qemu commandline if dirty ring feature enabled. though dirty ring is per-cpu logically, the size of dirty ring is registered by 'struct kvm' in QEMU. so we would like to place the dirty_ring_size as a property of vm in Libvirt as the QEMU do. the dirty ring feature is disabled by default, and if enabled, the default value of ring size if 4096 if size not configured. for more details about dirty ring and "-accel" option, please refer to: https://lore.kernel.org/qemu-devel/20210108165050.406906-10-peterx@redhat.co... https://lore.kernel.org/qemu-devel/3aa73987-40e8-3619-0723-9f17f73850bd@redh... please review, Thanks! Best Regards ! Hyman Huang(黄勇) (4): qemu_capabilities: introduce QEMU_CAPS_ACCEL qemu_command: switch accelerator option to new style conf: introduce dirty_ring_size field qemu: support dirty ring feature docs/formatdomain.rst | 18 +++-- docs/schemas/domaincommon.rng | 10 +++ src/conf/domain_conf.c | 76 ++++++++++++++++++- src/conf/domain_conf.h | 4 + src/qemu/qemu_capabilities.c | 2 + src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 40 +++++++++- .../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_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 + .../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 + ...fault-cpu-kvm-virt-4.2.aarch64-latest.args | 3 +- .../aarch64-features-sve.aarch64-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 +- ...u-Icelake-Server-pconfig.x86_64-3.1.0.args | 3 +- ...-Icelake-Server-pconfig.x86_64-latest.args | 3 +- .../cpu-host-model.x86_64-2.11.0.args | 3 +- .../cpu-host-model.x86_64-2.12.0.args | 3 +- .../cpu-host-model.x86_64-3.0.0.args | 3 +- .../cpu-host-model.x86_64-3.1.0.args | 3 +- .../cpu-host-model.x86_64-4.0.0.args | 3 +- .../cpu-host-model.x86_64-4.1.0.args | 3 +- .../cpu-host-model.x86_64-4.2.0.args | 3 +- .../cpu-host-model.x86_64-5.0.0.args | 3 +- .../cpu-host-model.x86_64-5.1.0.args | 3 +- .../cpu-host-model.x86_64-5.2.0.args | 3 +- .../cpu-host-model.x86_64-6.0.0.args | 3 +- .../cpu-host-model.x86_64-6.1.0.args | 3 +- .../cpu-host-model.x86_64-latest.args | 3 +- .../cpu-tsc-frequency.x86_64-4.0.0.args | 3 +- ...ult-video-type-aarch64.aarch64-latest.args | 3 +- ...default-video-type-ppc64.ppc64-latest.args | 3 +- ...default-video-type-s390x.s390x-latest.args | 3 +- .../disk-cdrom-network.x86_64-2.12.0.args | 3 +- .../disk-cdrom-network.x86_64-latest.args | 3 +- .../disk-network-http.x86_64-latest.args | 3 +- .../disk-serial.x86_64-latest.args | 3 +- .../graphics-spice-timeout.x86_64-latest.args | 3 +- .../hugepages-memaccess3.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 +- .../launch-security-s390-pv.s390x-latest.args | 3 +- ...v-missing-platform-info.x86_64-2.12.0.args | 3 +- .../launch-security-sev.x86_64-2.12.0.args | 3 +- .../launch-security-sev.x86_64-6.0.0.args | 3 +- ...memory-default-hugepage.x86_64-latest.args | 3 +- .../memfd-memory-numa.x86_64-latest.args | 3 +- ...mory-hotplug-virtio-mem.x86_64-latest.args | 3 +- ...mory-hotplug-virtio-pmem.x86_64-5.2.0.args | 3 +- ...ory-hotplug-virtio-pmem.x86_64-latest.args | 3 +- .../os-firmware-bios.x86_64-latest.args | 3 +- ...re-efi-no-enrolled-keys.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 +- ...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 +- ...t-cpu-kvm-ccw-virtio-2.7.s390x-latest.args | 3 +- ...t-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 3 +- ...rtcard-passthrough-unix.x86_64-latest.args | 3 +- .../usb-redir-unix.x86_64-latest.args | 3 +- ...vhost-user-fs-fd-memory.x86_64-latest.args | 3 +- .../virtio-rng-builtin.x86_64-5.2.0.args | 3 +- .../virtio-rng-builtin.x86_64-latest.args | 3 +- .../virtio-rng-egd-unix.x86_64-5.2.0.args | 3 +- .../virtio-rng-egd-unix.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 +- 111 files changed, 307 insertions(+), 72 deletions(-) -- 2.27.0

From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> since the "-machine" option for accelerators is legacy, "-accel" option may be a better mechanism. following are details: https://lore.kernel.org/qemu-devel/3aa73987-40e8-3619-0723-9f17f73850bd@redh... this patch introduce QEMU_CAPS_ACCEL capability to tell if we're dealing new enough QEMU so that we can replace '-machine accel' with '-accel'. there were two phases of -accel support in QEMU: - 2.9 to 4.2: only one -accel option supported; specifying a fallback couldn't be done with -accel and required the older "-machine accel=tcg:kvm" instead. - 5.0 or newer: multiple -accel options supported, e.g. "-accel tcg -accel kvm" and it would be possible to distinguish them, for example using QOM properties. however libvirt only ever specifies one accelerator so it makes no difference. since the oldest supported qemu by libvirt is qemu-2.11, so modify capability test cases with QEMU version >= 2.11.0 carefully. Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 + tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 + 44 files changed, 45 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index b864f4d7df..4a6a53d88e 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -651,6 +651,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "device.json", /* QEMU_CAPS_DEVICE_JSON */ "query-dirty-rate", /* QEMU_CAPS_QUERY_DIRTY_RATE */ "rbd-encryption", /* QEMU_CAPS_RBD_ENCRYPTION */ + "accel", /* QEMU_CAPS_ACCEL */ ); @@ -3203,6 +3204,7 @@ static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = { { "spice", "rendernode", QEMU_CAPS_SPICE_RENDERNODE }, { "vnc", "power-control", QEMU_CAPS_VNC_POWER_CONTROL }, { "vnc", "audiodev", QEMU_CAPS_AUDIODEV }, + { "accel", NULL, QEMU_CAPS_ACCEL }, }; static int diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 61bdbdb2ac..b625e3910d 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -631,6 +631,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_DEVICE_JSON, /* -device accepts JSON */ QEMU_CAPS_QUERY_DIRTY_RATE, /* accepts query-dirty-rate */ QEMU_CAPS_RBD_ENCRYPTION, /* Ceph RBD encryption support */ + QEMU_CAPS_ACCEL, /* -accel */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml index 4d916121c5..e773b938c9 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml @@ -91,6 +91,7 @@ <flag name='migration-param.downtime'/> <flag name='migration-param.xbzrle-cache-size'/> <flag name='input-linux'/> + <flag name='accel'/> <version>2011000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>39100288</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml index ed9826504c..9638a75e77 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml @@ -166,6 +166,7 @@ <flag name='am53c974'/> <flag name='cpu-max'/> <flag name='input-linux'/> + <flag name='accel'/> <version>2011000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100288</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml index 0c646c9c24..3e61e3e59e 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml @@ -138,6 +138,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>2012000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700289</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml index eb964e46d6..9c3b638530 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml @@ -137,6 +137,7 @@ <flag name='cpu-max'/> <flag name='input-linux'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>2011090</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900289</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml index 15a3e8724b..90bac6e250 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml @@ -105,6 +105,7 @@ <flag name='vhost-user-blk'/> <flag name='input-linux'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>2012000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>39100289</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml index 7f536db863..0da4a17bdc 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -178,6 +178,7 @@ <flag name='cpu-max'/> <flag name='input-linux'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>2011090</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100289</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml index e287c85293..650c2eeb95 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml @@ -139,6 +139,7 @@ <flag name='cpu-max'/> <flag name='input-linux'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>2012050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900239</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml index 4f1a2631d8..fd662028a0 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml @@ -75,6 +75,7 @@ <flag name='migration-param.xbzrle-cache-size'/> <flag name='vhost-user-blk'/> <flag name='input-linux'/> + <flag name='accel'/> <version>3000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml index c917876949..81bec3717b 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml @@ -75,6 +75,7 @@ <flag name='migration-param.xbzrle-cache-size'/> <flag name='vhost-user-blk'/> <flag name='input-linux'/> + <flag name='accel'/> <version>3000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml index 4d0be025fd..8b8e22b72f 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml @@ -108,6 +108,7 @@ <flag name='vhost-user-blk'/> <flag name='input-linux'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>3000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>39100239</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml index 24ebdf3bbf..891460772f 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml @@ -184,6 +184,7 @@ <flag name='cpu-max'/> <flag name='input-linux'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>3000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100239</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml index 05d7921734..5a70fed6e9 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml @@ -144,6 +144,7 @@ <flag name='cpu-max'/> <flag name='input-linux'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>3000091</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900240</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml index eedf55d677..5ce61bdedd 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml @@ -188,6 +188,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>3000092</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100240</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml index 3fe7332e19..2c4b6a53d2 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml @@ -154,6 +154,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>4000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700240</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml index 10f0d825e7..d1004e1cda 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml @@ -161,6 +161,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>4000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900240</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml index 9ae7a9260a..d8bd1a0ba5 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml @@ -151,6 +151,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>4000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml index cbfdf4968e..b21efef7e8 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml @@ -151,6 +151,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>4000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml index 8e6ac7a8a9..7583cb41a1 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml @@ -120,6 +120,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>4000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>39100240</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml index 2e5947aff6..b760094f15 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -196,6 +196,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>4000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100240</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml index 40ad314d29..c057ae9029 100644 --- a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml @@ -203,6 +203,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>4001000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100241</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml index 6cdc32dab3..a3377da552 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -169,6 +169,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>4001050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml index 25e879b851..d3ff89a441 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -168,6 +168,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>4001050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml index beac3db473..d09f20f311 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml @@ -133,6 +133,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>4002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>39100242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml index 415d12054b..9285fc3465 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -214,6 +214,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>4002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml index bb6a7d5ee7..5604193c5e 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -179,6 +179,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>5000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700241</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml index f8317c1117..8f4ddce8ee 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -187,6 +187,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>5000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900241</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml index 58c7eb6651..11ac230161 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -171,6 +171,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>5000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml index 69f49020e7..f5641ee82d 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -221,6 +221,7 @@ <flag name='input-linux'/> <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> + <flag name='accel'/> <version>5000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100241</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml index 58af90b29f..08da1e4ed0 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml @@ -90,6 +90,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <flag name='accel'/> <version>5001000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml index 578e16e8b0..07b25c5324 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -224,6 +224,7 @@ <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> <flag name='virtio-mem-pci'/> + <flag name='accel'/> <version>5001000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml index b943eaedaf..8af4f7109e 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -184,6 +184,7 @@ <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> <flag name='query-dirty-rate'/> + <flag name='accel'/> <version>5002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml index ec64e1cacf..fa483c659a 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -190,6 +190,7 @@ <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> <flag name='query-dirty-rate'/> + <flag name='accel'/> <version>5002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml index a11d15f91a..e56dd7f42f 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml @@ -174,6 +174,7 @@ <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> <flag name='query-dirty-rate'/> + <flag name='accel'/> <version>5002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml index 552e1d43c9..74dffd88da 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -141,6 +141,7 @@ <flag name='query-display-options'/> <flag name='virtio-blk.queue-size'/> <flag name='query-dirty-rate'/> + <flag name='accel'/> <version>5002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>39100243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml index bcc262551a..97771139ec 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -227,6 +227,7 @@ <flag name='virtio-mem-pci'/> <flag name='piix4.acpi-root-pci-hotplug'/> <flag name='query-dirty-rate'/> + <flag name='accel'/> <version>5002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml index 0fefe64537..bbf668fe78 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml @@ -192,6 +192,7 @@ <flag name='set-action'/> <flag name='virtio-blk.queue-size'/> <flag name='query-dirty-rate'/> + <flag name='accel'/> <version>6000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml index 61685066b8..595b3fafea 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml @@ -149,6 +149,7 @@ <flag name='set-action'/> <flag name='virtio-blk.queue-size'/> <flag name='query-dirty-rate'/> + <flag name='accel'/> <version>6000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>39100242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml index 1b394198f1..dc1598c98b 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -235,6 +235,7 @@ <flag name='virtio-mem-pci'/> <flag name='piix4.acpi-root-pci-hotplug'/> <flag name='query-dirty-rate'/> + <flag name='accel'/> <version>6000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100242</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml index 1f4f49eb34..181beee79b 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -239,6 +239,7 @@ <flag name='piix4.acpi-root-pci-hotplug'/> <flag name='query-dirty-rate'/> <flag name='rbd-encryption'/> + <flag name='accel'/> <version>6001000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml index 9662214cd8..14129d63ae 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -204,6 +204,7 @@ <flag name='device.json'/> <flag name='query-dirty-rate'/> <flag name='rbd-encryption'/> + <flag name='accel'/> <version>6001050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>61700244</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml index 94528ba13a..4bb8674d3f 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml @@ -200,6 +200,7 @@ <flag name='device.json'/> <flag name='query-dirty-rate'/> <flag name='rbd-encryption'/> + <flag name='accel'/> <version>6001050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>42900244</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml index 39179916c5..561777bf9b 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -240,6 +240,7 @@ <flag name='device.json'/> <flag name='query-dirty-rate'/> <flag name='rbd-encryption'/> + <flag name='accel'/> <version>6001050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100244</microcodeVersion> -- 2.27.0

On Sat, Nov 20, 2021 at 03:20:45 -0500, huangy81@chinatelecom.cn wrote:
From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
since the "-machine" option for accelerators is legacy, "-accel" option may be a better mechanism. following are details: https://lore.kernel.org/qemu-devel/3aa73987-40e8-3619-0723-9f17f73850bd@redh...
this patch introduce QEMU_CAPS_ACCEL capability to tell if we're dealing new enough QEMU so that we can replace '-machine accel' with '-accel'.
there were two phases of -accel support in QEMU: - 2.9 to 4.2: only one -accel option supported; specifying a fallback couldn't be done with -accel and required the older "-machine accel=tcg:kvm" instead.
- 5.0 or newer: multiple -accel options supported, e.g. "-accel tcg -accel kvm" and it would be possible to distinguish them, for example using QOM properties.
however libvirt only ever specifies one accelerator so it makes no difference.
since the oldest supported qemu by libvirt is qemu-2.11, so modify capability test cases with QEMU version >= 2.11.0 carefully.
Well, this actually means we don't need the capability at all, we can just unconditionally switch to -accel. Michal attempted the same: https://listman.redhat.com/archives/libvir-list/2021-November/msg00196.html This patch should be dropped, the capability can be removed from any subsequent patches.

From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> QEMU greater than 2.9.0 support '-accel' option, change the way of assembling commandline from "accel=kvm" to "-accel kvm" when specifying accelerator. Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> --- src/qemu/qemu_command.c | 31 ++++++++++++++++++- ...fault-cpu-kvm-virt-4.2.aarch64-latest.args | 3 +- .../aarch64-features-sve.aarch64-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 +- ...u-Icelake-Server-pconfig.x86_64-3.1.0.args | 3 +- ...-Icelake-Server-pconfig.x86_64-latest.args | 3 +- .../cpu-host-model.x86_64-2.11.0.args | 3 +- .../cpu-host-model.x86_64-2.12.0.args | 3 +- .../cpu-host-model.x86_64-3.0.0.args | 3 +- .../cpu-host-model.x86_64-3.1.0.args | 3 +- .../cpu-host-model.x86_64-4.0.0.args | 3 +- .../cpu-host-model.x86_64-4.1.0.args | 3 +- .../cpu-host-model.x86_64-4.2.0.args | 3 +- .../cpu-host-model.x86_64-5.0.0.args | 3 +- .../cpu-host-model.x86_64-5.1.0.args | 3 +- .../cpu-host-model.x86_64-5.2.0.args | 3 +- .../cpu-host-model.x86_64-6.0.0.args | 3 +- .../cpu-host-model.x86_64-6.1.0.args | 3 +- .../cpu-host-model.x86_64-latest.args | 3 +- .../cpu-tsc-frequency.x86_64-4.0.0.args | 3 +- ...ult-video-type-aarch64.aarch64-latest.args | 3 +- ...default-video-type-ppc64.ppc64-latest.args | 3 +- ...default-video-type-s390x.s390x-latest.args | 3 +- .../disk-cdrom-network.x86_64-2.12.0.args | 3 +- .../disk-cdrom-network.x86_64-latest.args | 3 +- .../disk-network-http.x86_64-latest.args | 3 +- .../disk-serial.x86_64-latest.args | 3 +- .../graphics-spice-timeout.x86_64-latest.args | 3 +- .../hugepages-memaccess3.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 +- .../launch-security-s390-pv.s390x-latest.args | 3 +- ...v-missing-platform-info.x86_64-2.12.0.args | 3 +- .../launch-security-sev.x86_64-2.12.0.args | 3 +- .../launch-security-sev.x86_64-6.0.0.args | 3 +- ...memory-default-hugepage.x86_64-latest.args | 3 +- .../memfd-memory-numa.x86_64-latest.args | 3 +- ...mory-hotplug-virtio-mem.x86_64-latest.args | 3 +- ...mory-hotplug-virtio-pmem.x86_64-5.2.0.args | 3 +- ...ory-hotplug-virtio-pmem.x86_64-latest.args | 3 +- .../os-firmware-bios.x86_64-latest.args | 3 +- ...re-efi-no-enrolled-keys.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 +- ...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 +- ...t-cpu-kvm-ccw-virtio-2.7.s390x-latest.args | 3 +- ...t-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 3 +- ...rtcard-passthrough-unix.x86_64-latest.args | 3 +- .../usb-redir-unix.x86_64-latest.args | 3 +- ...vhost-user-fs-fd-memory.x86_64-latest.args | 3 +- .../virtio-rng-builtin.x86_64-5.2.0.args | 3 +- .../virtio-rng-builtin.x86_64-latest.args | 3 +- .../virtio-rng-egd-unix.x86_64-5.2.0.args | 3 +- .../virtio-rng-egd-unix.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 +- 63 files changed, 154 insertions(+), 63 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3108bdd581..a8f73c2d3e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7027,6 +7027,23 @@ qemuBuildNameCommandLine(virCommand *cmd, return 0; } +static void +qemuBuildAccelCommandLineKvmOptions(virCommand *cmd, + const virDomainDef *def) +{ + /* + * only handle the kvm case, tcg case use the legacy style + * not that either kvm or tcg can be specified by libvirt + * so do not worry about the conflict of specifying both + * */ + if ((virDomainVirtType)def->virtType == VIR_DOMAIN_VIRT_KVM) { + g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; + virCommandAddArg(cmd, "-accel"); + virBufferAddLit(&buf, "kvm"); + virCommandAddArgBuffer(cmd, &buf); + } +} + static int qemuBuildMachineCommandLine(virCommand *cmd, virQEMUDriverConfig *cfg, @@ -7048,8 +7065,16 @@ qemuBuildMachineCommandLine(virCommand *cmd, virBufferAddLit(&buf, ",accel=tcg"); break; + /* + * QEMU greater than 2.9.0 support '-accel', change the way of + * building commandline from "accel=kvm" to "-accel kvm", skip + * setting accel property if we have ACCEL cap, leave the + * "qemuBuildAccelCommandLine" do this. + **/ case VIR_DOMAIN_VIRT_KVM: - virBufferAddLit(&buf, ",accel=kvm"); + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_ACCEL)) { + virBufferAddLit(&buf, ",accel=kvm"); + } break; case VIR_DOMAIN_VIRT_KQEMU: @@ -10705,6 +10730,10 @@ qemuBuildCommandLine(virQEMUDriver *driver, if (qemuBuildMachineCommandLine(cmd, cfg, def, qemuCaps, priv) < 0) return NULL; + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ACCEL)) { + qemuBuildAccelCommandLineKvmOptions(cmd, def); + } + qemuBuildTSEGCommandLine(cmd, def); if (qemuBuildCpuCommandLine(cmd, driver, def, qemuCaps) < 0) diff --git a/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.args index 0a21ce9493..c17bcad5cf 100644 --- a/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.args +++ b/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -name guest=guest,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-guest/master-key.aes"}' \ --machine virt-4.2,accel=kvm,usb=off,dump-guest-core=off,gic-version=3,memory-backend=mach-virt.ram \ +-machine virt-4.2,usb=off,dump-guest-core=off,gic-version=3,memory-backend=mach-virt.ram \ +-accel kvm \ -m 4096 \ -object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":4294967296}' \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/aarch64-features-sve.aarch64-latest.args b/tests/qemuxml2argvdata/aarch64-features-sve.aarch64-latest.args index 9acd9b4081..9b5485c957 100644 --- a/tests/qemuxml2argvdata/aarch64-features-sve.aarch64-latest.args +++ b/tests/qemuxml2argvdata/aarch64-features-sve.aarch64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -name guest=guest,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-guest/master-key.aes"}' \ --machine virt,accel=kvm,usb=off,dump-guest-core=off,gic-version=3,memory-backend=mach-virt.ram \ +-machine virt,usb=off,dump-guest-core=off,gic-version=3,memory-backend=mach-virt.ram \ +-accel kvm \ -cpu host,sve512=on,sve384=off,sve256=on,sve128=on,sve=on \ -m 1024 \ -object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ diff --git a/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-latest.args b/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-latest.args index f43ddb9627..6d34fa71bf 100644 --- a/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-latest.args +++ b/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/clock-timer-armvtimer.aarch64-latest.args b/tests/qemuxml2argvdata/clock-timer-armvtimer.aarch64-latest.args index 0c3d73acaf..1a5fc89d8a 100644 --- a/tests/qemuxml2argvdata/clock-timer-armvtimer.aarch64-latest.args +++ b/tests/qemuxml2argvdata/clock-timer-armvtimer.aarch64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -name guest=guest,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-guest/master-key.aes"}' \ --machine virt,accel=kvm,usb=off,dump-guest-core=off,gic-version=3,memory-backend=mach-virt.ram \ +-machine virt,usb=off,dump-guest-core=off,gic-version=3,memory-backend=mach-virt.ram \ +-accel kvm \ -cpu host,kvm-no-adjvtime=on \ -m 4096 \ -object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":4294967296}' \ diff --git a/tests/qemuxml2argvdata/console-virtio-unix.x86_64-latest.args b/tests/qemuxml2argvdata/console-virtio-unix.x86_64-latest.args index 4765ae6fb5..7803b4ff37 100644 --- a/tests/qemuxml2argvdata/console-virtio-unix.x86_64-latest.args +++ b/tests/qemuxml2argvdata/console-virtio-unix.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0.args b/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0.args index 26ec8b9213..5c9a0fd9d2 100644 --- a/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0.args +++ b/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0.args @@ -11,7 +11,8 @@ QEMU_AUDIO_DRV=none \ -name guest=test,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-test/master-key.aes \ --machine pc-i440fx-3.1,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-i440fx-3.1,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu Icelake-Server,pconfig=off,intel-pt=off \ -m 214 \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-latest.args index 612b77581b..d8857f9c36 100644 --- a/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-latest.args +++ b/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-test/.config \ -name guest=test,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-test/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu Icelake-Server,intel-pt=off \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.11.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.11.0.args index db6488caed..2d74495626 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.11.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.11.0.args @@ -11,7 +11,8 @@ QEMU_AUDIO_DRV=none \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-q35-2.11,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-q35-2.11,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu Skylake-Client,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,xsaves=on,pdpe1gb=on \ -m 214 \ -realtime mlock=off \ diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.12.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.12.0.args index 006bdc885c..95bae07f4a 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.12.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.12.0.args @@ -11,7 +11,8 @@ QEMU_AUDIO_DRV=none \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-q35-2.12,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-q35-2.12,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu Haswell-noTSX,vme=on,ss=on,f16c=on,rdrand=on,hypervisor=on,arat=on,tsc-adjust=on,xsaveopt=on,pdpe1gb=on,abm=on \ -m 214 \ -realtime mlock=off \ diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.0.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.0.0.args index 8ae8db3af2..10deeac2c8 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.0.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.0.0.args @@ -11,7 +11,8 @@ QEMU_AUDIO_DRV=none \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-q35-3.0,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-q35-3.0,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,xsaves=on,pdpe1gb=on,topoext=on \ -m 214 \ -realtime mlock=off \ diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.1.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.1.0.args index 917ab69cd1..f7e48be757 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.1.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.1.0.args @@ -11,7 +11,8 @@ QEMU_AUDIO_DRV=none \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-q35-3.1,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-q35-3.1,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,xsaves=on,pdpe1gb=on \ -m 214 \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.0.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.0.0.args index 39e2a20328..4c7fcf8a31 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.0.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.0.0.args @@ -11,7 +11,8 @@ QEMU_AUDIO_DRV=none \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-q35-4.0,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-q35-4.0,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,ssbd=on,xsaves=on,pdpe1gb=on \ -m 214 \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.1.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.1.0.args index bda5f557d9..8e126568d0 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.1.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.1.0.args @@ -11,7 +11,8 @@ QEMU_AUDIO_DRV=none \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-q35-4.1,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-q35-4.1,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,pdpe1gb=on,skip-l1dfl-vmentry=on \ -m 214 \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.2.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.2.0.args index 3bb4c35894..4b2b55be62 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.2.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.2.0.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-q35-4.2,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-q35-4.2,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,pdpe1gb=on,skip-l1dfl-vmentry=on,pschange-mc-no=on \ -m 214 \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.0.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.0.0.args index 3c4f006566..2ea818cc13 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.0.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.0.0.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-q35-5.0,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-q35-5.0,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,pdpe1gb=on,skip-l1dfl-vmentry=on,pschange-mc-no=on \ -m 214 \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.1.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.1.0.args index 43f857cfff..c6e2f345b8 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.1.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.1.0.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-q35-5.1,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-q35-5.1,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on \ -m 214 \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.2.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.2.0.args index 91aa8d12f2..5bb6545e62 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.2.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.2.0.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-q35-5.2,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc-q35-5.2,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on \ -m 214 \ -object memory-backend-ram,id=pc.ram,size=224395264 \ diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.0.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.0.0.args index 82039f466a..57ae8a19d8 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.0.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.0.0.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc-q35-6.0,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc-q35-6.0,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.1.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.1.0.args index e17f959809..baf0955027 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.1.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.1.0.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc-q35-6.1,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc-q35-6.1,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,svme-addr-chk=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args index c2bf0d9834..7ed0ee28b8 100644 --- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args +++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine q35,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine q35,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,svme-addr-chk=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/cpu-tsc-frequency.x86_64-4.0.0.args b/tests/qemuxml2argvdata/cpu-tsc-frequency.x86_64-4.0.0.args index 66ada24c92..ba1606704f 100644 --- a/tests/qemuxml2argvdata/cpu-tsc-frequency.x86_64-4.0.0.args +++ b/tests/qemuxml2argvdata/cpu-tsc-frequency.x86_64-4.0.0.args @@ -11,7 +11,8 @@ QEMU_AUDIO_DRV=none \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-i440fx-4.0,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-i440fx-4.0,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,ssbd=on,xsaves=on,pdpe1gb=on,invtsc=on,tsc-frequency=4567890000 \ -m 214 \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args b/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args index 46d1b14535..e13a2be3f0 100644 --- a/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args +++ b/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-default-video-type-a/.config \ -name guest=default-video-type-aarch64-test,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-default-video-type-a/master-key.aes"}' \ --machine virt,accel=kvm,usb=off,dump-guest-core=off,gic-version=3,memory-backend=mach-virt.ram \ +-machine virt,usb=off,dump-guest-core=off,gic-version=3,memory-backend=mach-virt.ram \ +-accel kvm \ -m 1024 \ -object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/default-video-type-ppc64.ppc64-latest.args b/tests/qemuxml2argvdata/default-video-type-ppc64.ppc64-latest.args index baefa66718..25c5eb3140 100644 --- a/tests/qemuxml2argvdata/default-video-type-ppc64.ppc64-latest.args +++ b/tests/qemuxml2argvdata/default-video-type-ppc64.ppc64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-default-video-type-p/.config \ -name guest=default-video-type-ppc64-test,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-default-video-type-p/master-key.aes"}' \ --machine pseries,accel=kvm,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \ +-machine pseries,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \ +-accel kvm \ -cpu host \ -m 1024 \ -object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":1073741824}' \ diff --git a/tests/qemuxml2argvdata/default-video-type-s390x.s390x-latest.args b/tests/qemuxml2argvdata/default-video-type-s390x.s390x-latest.args index 5fee246959..d323e5abf4 100644 --- a/tests/qemuxml2argvdata/default-video-type-s390x.s390x-latest.args +++ b/tests/qemuxml2argvdata/default-video-type-s390x.s390x-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-default-video-type-s/.config \ -name guest=default-video-type-s390x-test,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-default-video-type-s/master-key.aes"}' \ --machine s390-ccw-virtio,accel=kvm,usb=off,dump-guest-core=off,memory-backend=s390.ram \ +-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \ +-accel kvm \ -cpu gen15a-base,aen=on,cmmnt=on,vxpdeh=on,aefsi=on,diag318=on,csske=on,mepoch=on,msa9=on,msa8=on,msa7=on,msa6=on,msa5=on,msa4=on,msa3=on,msa2=on,msa1=on,sthyi=on,edat=on,ri=on,deflate=on,edat2=on,etoken=on,vx=on,ipter=on,mepochptff=on,ap=on,vxeh=on,vxpd=on,esop=on,msa9_pckmo=on,vxeh2=on,esort=on,apqi=on,apft=on,els=on,iep=on,apqci=on,cte=on,ais=on,bpb=on,gs=on,ppa15=on,zpci=on,sea_esop2=on,te=on,cmm=on \ -m 1024 \ -object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":1073741824}' \ diff --git a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-2.12.0.args b/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-2.12.0.args index 659cca40ea..aca93dd5ea 100644 --- a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-2.12.0.args +++ b/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-2.12.0.args @@ -11,7 +11,8 @@ QEMU_AUDIO_DRV=none \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-i440fx-2.12,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-i440fx-2.12,usb=off,dump-guest-core=off \ +-accel kvm \ -m 1024 \ -realtime mlock=off \ -smp 1,sockets=1,cores=1,threads=1 \ diff --git a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args b/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args index 437d8c210e..6bc09072eb 100644 --- a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 1024 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ diff --git a/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args index fbd979139b..f98f0815ee 100644 --- a/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/disk-serial.x86_64-latest.args b/tests/qemuxml2argvdata/disk-serial.x86_64-latest.args index 6ae7245743..be4ed131e3 100644 --- a/tests/qemuxml2argvdata/disk-serial.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-serial.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/graphics-spice-timeout.x86_64-latest.args b/tests/qemuxml2argvdata/graphics-spice-timeout.x86_64-latest.args index 538bff2583..541634b807 100644 --- a/tests/qemuxml2argvdata/graphics-spice-timeout.x86_64-latest.args +++ b/tests/qemuxml2argvdata/graphics-spice-timeout.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-f14/.config \ -name guest=f14,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-f14/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu core2duo,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,ds-cpl=on,vmx=on,est=on,tm2=on,cx16=on,xtpr=on,lahf-lm=on \ -m 1024 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ diff --git a/tests/qemuxml2argvdata/hugepages-memaccess3.x86_64-latest.args b/tests/qemuxml2argvdata/hugepages-memaccess3.x86_64-latest.args index db70baf028..1d8ecbcf52 100644 --- a/tests/qemuxml2argvdata/hugepages-memaccess3.x86_64-latest.args +++ b/tests/qemuxml2argvdata/hugepages-memaccess3.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -name guest=fedora,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-fedora/master-key.aes"}' \ --machine pc-i440fx-2.9,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc-i440fx-2.9,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 4096 \ -object '{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-fedora","share":true,"x-use-canonical-path-for-ramblock-id":false,"prealloc":true,"size":4294967296}' \ diff --git a/tests/qemuxml2argvdata/intel-iommu-aw-bits.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu-aw-bits.x86_64-latest.args index b45f94a40c..f61ff3f8ff 100644 --- a/tests/qemuxml2argvdata/intel-iommu-aw-bits.x86_64-latest.args +++ b/tests/qemuxml2argvdata/intel-iommu-aw-bits.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine q35,accel=kvm,usb=off,dump-guest-core=off,kernel_irqchip=split,memory-backend=pc.ram \ +-machine q35,usb=off,dump-guest-core=off,kernel_irqchip=split,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/intel-iommu-caching-mode.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu-caching-mode.x86_64-latest.args index c5a2c995d5..083c6bfe4b 100644 --- a/tests/qemuxml2argvdata/intel-iommu-caching-mode.x86_64-latest.args +++ b/tests/qemuxml2argvdata/intel-iommu-caching-mode.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine q35,accel=kvm,usb=off,dump-guest-core=off,kernel_irqchip=split,memory-backend=pc.ram \ +-machine q35,usb=off,dump-guest-core=off,kernel_irqchip=split,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/intel-iommu-device-iotlb.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu-device-iotlb.x86_64-latest.args index b138ff2dc5..fc06e15191 100644 --- a/tests/qemuxml2argvdata/intel-iommu-device-iotlb.x86_64-latest.args +++ b/tests/qemuxml2argvdata/intel-iommu-device-iotlb.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine q35,accel=kvm,usb=off,dump-guest-core=off,kernel_irqchip=split,memory-backend=pc.ram \ +-machine q35,usb=off,dump-guest-core=off,kernel_irqchip=split,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/intel-iommu-eim.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu-eim.x86_64-latest.args index 6068549126..c8dd31c5fe 100644 --- a/tests/qemuxml2argvdata/intel-iommu-eim.x86_64-latest.args +++ b/tests/qemuxml2argvdata/intel-iommu-eim.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine q35,accel=kvm,usb=off,dump-guest-core=off,kernel_irqchip=split,memory-backend=pc.ram \ +-machine q35,usb=off,dump-guest-core=off,kernel_irqchip=split,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/launch-security-s390-pv.s390x-latest.args b/tests/qemuxml2argvdata/launch-security-s390-pv.s390x-latest.args index 5f18bd7174..1bb7b3f084 100644 --- a/tests/qemuxml2argvdata/launch-security-s390-pv.s390x-latest.args +++ b/tests/qemuxml2argvdata/launch-security-s390-pv.s390x-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine s390-ccw-virtio,accel=kvm,usb=off,dump-guest-core=off,confidential-guest-support=lsec0,memory-backend=s390.ram \ +-machine s390-ccw-virtio,usb=off,dump-guest-core=off,confidential-guest-support=lsec0,memory-backend=s390.ram \ +-accel kvm \ -cpu gen15a-base,aen=on,cmmnt=on,vxpdeh=on,aefsi=on,diag318=on,csske=on,mepoch=on,msa9=on,msa8=on,msa7=on,msa6=on,msa5=on,msa4=on,msa3=on,msa2=on,msa1=on,sthyi=on,edat=on,ri=on,deflate=on,edat2=on,etoken=on,vx=on,ipter=on,mepochptff=on,ap=on,vxeh=on,vxpd=on,esop=on,msa9_pckmo=on,vxeh2=on,esort=on,apqi=on,apft=on,els=on,iep=on,apqci=on,cte=on,ais=on,bpb=on,gs=on,ppa15=on,zpci=on,sea_esop2=on,te=on,cmm=on \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/launch-security-sev-missing-platform-info.x86_64-2.12.0.args b/tests/qemuxml2argvdata/launch-security-sev-missing-platform-info.x86_64-2.12.0.args index daa271c35c..20ad935a68 100644 --- a/tests/qemuxml2argvdata/launch-security-sev-missing-platform-info.x86_64-2.12.0.args +++ b/tests/qemuxml2argvdata/launch-security-sev-missing-platform-info.x86_64-2.12.0.args @@ -11,7 +11,8 @@ QEMU_AUDIO_DRV=none \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-1.0,accel=kvm,usb=off,dump-guest-core=off,memory-encryption=lsec0 \ +-machine pc-1.0,usb=off,dump-guest-core=off,memory-encryption=lsec0 \ +-accel kvm \ -m 214 \ -realtime mlock=off \ -smp 1,sockets=1,cores=1,threads=1 \ diff --git a/tests/qemuxml2argvdata/launch-security-sev.x86_64-2.12.0.args b/tests/qemuxml2argvdata/launch-security-sev.x86_64-2.12.0.args index 818d29be9f..f7000ea11d 100644 --- a/tests/qemuxml2argvdata/launch-security-sev.x86_64-2.12.0.args +++ b/tests/qemuxml2argvdata/launch-security-sev.x86_64-2.12.0.args @@ -11,7 +11,8 @@ QEMU_AUDIO_DRV=none \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-i440fx-2.12,accel=kvm,usb=off,dump-guest-core=off,memory-encryption=lsec0 \ +-machine pc-i440fx-2.12,usb=off,dump-guest-core=off,memory-encryption=lsec0 \ +-accel kvm \ -m 214 \ -realtime mlock=off \ -smp 1,sockets=1,cores=1,threads=1 \ diff --git a/tests/qemuxml2argvdata/launch-security-sev.x86_64-6.0.0.args b/tests/qemuxml2argvdata/launch-security-sev.x86_64-6.0.0.args index 812a8f5637..5dfaf69063 100644 --- a/tests/qemuxml2argvdata/launch-security-sev.x86_64-6.0.0.args +++ b/tests/qemuxml2argvdata/launch-security-sev.x86_64-6.0.0.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc-i440fx-6.0,accel=kvm,usb=off,dump-guest-core=off,confidential-guest-support=lsec0,memory-backend=pc.ram \ +-machine pc-i440fx-6.0,usb=off,dump-guest-core=off,confidential-guest-support=lsec0,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.args b/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.args index cbbcbbd9c0..383635c8cd 100644 --- a/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.args +++ b/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-instance-00000092/.config \ -name guest=instance-00000092,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-instance-00000092/master-key.aes"}' \ --machine pc-i440fx-2.3,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-i440fx-2.3,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu qemu64 \ -m 14336 \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args index 1d6bd50458..9d1f9831d9 100644 --- a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args +++ b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-instance-00000092/.config \ -name guest=instance-00000092,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-instance-00000092/master-key.aes"}' \ --machine pc-i440fx-2.3,accel=kvm,usb=off,dump-guest-core=off,nvdimm=on \ +-machine pc-i440fx-2.3,usb=off,dump-guest-core=off,nvdimm=on \ +-accel kvm \ -cpu qemu64 \ -m size=14680064k,slots=16,maxmem=1099511627776k \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args index 8aedc9a8f8..62b31689d7 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args +++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu qemu64 \ -m size=2095104k,slots=16,maxmem=1099511627776k \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args index fe30e39a7f..cdd6970f70 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args +++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-i440fx-5.2,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc-i440fx-5.2,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu qemu64 \ -m size=2095104k,slots=16,maxmem=1099511627776k \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args index 7f2f3e7daf..5ac1031cdf 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args +++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu qemu64 \ -m size=2095104k,slots=16,maxmem=1099511627776k \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args b/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args index 6e359db564..dd159e2604 100644 --- a/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args +++ b/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -name guest=fedora,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-fedora/master-key.aes"}' \ --machine pc-q35-4.0,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc-q35-4.0,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -bios /usr/share/seabios/bios-256k.bin \ -m 8 \ diff --git a/tests/qemuxml2argvdata/os-firmware-efi-no-enrolled-keys.x86_64-latest.args b/tests/qemuxml2argvdata/os-firmware-efi-no-enrolled-keys.x86_64-latest.args index 647dc632d6..57fc34cc4d 100644 --- a/tests/qemuxml2argvdata/os-firmware-efi-no-enrolled-keys.x86_64-latest.args +++ b/tests/qemuxml2argvdata/os-firmware-efi-no-enrolled-keys.x86_64-latest.args @@ -14,7 +14,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/fedora_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ --machine pc-q35-4.0,accel=kvm,usb=off,dump-guest-core=off,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,memory-backend=pc.ram \ +-machine pc-q35-4.0,usb=off,dump-guest-core=off,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 8 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":8388608}' \ diff --git a/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args b/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args index e5d5886569..fdbf8deabe 100644 --- a/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args +++ b/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args @@ -14,7 +14,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/fedora_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ --machine pc-q35-4.0,accel=kvm,usb=off,smm=on,dump-guest-core=off,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,memory-backend=pc.ram \ +-machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -global driver=cfi.pflash01,property=secure,value=on \ -m 8 \ diff --git a/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args b/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args index a8bd9a2fe1..470fe31256 100644 --- a/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args +++ b/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args @@ -14,7 +14,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/fedora_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \ --machine pc-q35-4.0,accel=kvm,usb=off,smm=on,dump-guest-core=off,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,memory-backend=pc.ram \ +-machine pc-q35-4.0,usb=off,smm=on,dump-guest-core=off,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 8 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":8388608}' \ diff --git a/tests/qemuxml2argvdata/parallel-unix-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/parallel-unix-chardev.x86_64-latest.args index 98c8c4c985..f9f9cde4e7 100644 --- a/tests/qemuxml2argvdata/parallel-unix-chardev.x86_64-latest.args +++ b/tests/qemuxml2argvdata/parallel-unix-chardev.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.args b/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.args index d9e1d24f65..65ba777f02 100644 --- a/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.args +++ b/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-2.7.ppc64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -name guest=guest,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-guest/master-key.aes"}' \ --machine pseries-2.7,accel=kvm,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \ +-machine pseries-2.7,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \ +-accel kvm \ -cpu POWER9 \ -m 4096 \ -object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":4294967296}' \ diff --git a/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.args b/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.args index 4ca2cfb960..0e01aa595d 100644 --- a/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.args +++ b/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-3.1.ppc64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -name guest=guest,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-guest/master-key.aes"}' \ --machine pseries-3.1,accel=kvm,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \ +-machine pseries-3.1,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \ +-accel kvm \ -cpu POWER9 \ -m 4096 \ -object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":4294967296}' \ diff --git a/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.args b/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.args index edb5806e9e..a44dac6afd 100644 --- a/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.args +++ b/tests/qemuxml2argvdata/ppc64-default-cpu-kvm-pseries-4.2.ppc64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -name guest=guest,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-guest/master-key.aes"}' \ --machine pseries-4.2,accel=kvm,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \ +-machine pseries-4.2,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \ +-accel kvm \ -cpu POWER9 \ -m 4096 \ -object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":4294967296}' \ diff --git a/tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.args b/tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.args index 97983b2bc1..5aa9c7b142 100644 --- a/tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.args +++ b/tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-test/.config \ -name guest=test,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-test/master-key.aes"}' \ --machine s390-ccw-virtio-2.7,accel=kvm,usb=off,dump-guest-core=off,memory-backend=s390.ram \ +-machine s390-ccw-virtio-2.7,usb=off,dump-guest-core=off,memory-backend=s390.ram \ +-accel kvm \ -cpu host \ -m 256 \ -object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":268435456}' \ diff --git a/tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.args b/tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.args index 3eb4b4e793..db03ab2672 100644 --- a/tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.args +++ b/tests/qemuxml2argvdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-test/.config \ -name guest=test,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-test/master-key.aes"}' \ --machine s390-ccw-virtio-4.2,accel=kvm,usb=off,dump-guest-core=off,memory-backend=s390.ram \ +-machine s390-ccw-virtio-4.2,usb=off,dump-guest-core=off,memory-backend=s390.ram \ +-accel kvm \ -cpu gen15a-base,aen=on,cmmnt=on,vxpdeh=on,aefsi=on,diag318=on,csske=on,mepoch=on,msa9=on,msa8=on,msa7=on,msa6=on,msa5=on,msa4=on,msa3=on,msa2=on,msa1=on,sthyi=on,edat=on,ri=on,deflate=on,edat2=on,etoken=on,vx=on,ipter=on,mepochptff=on,ap=on,vxeh=on,vxpd=on,esop=on,msa9_pckmo=on,vxeh2=on,esort=on,apqi=on,apft=on,els=on,iep=on,apqci=on,cte=on,ais=on,bpb=on,gs=on,ppa15=on,zpci=on,sea_esop2=on,te=on,cmm=on \ -m 256 \ -object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":268435456}' \ diff --git a/tests/qemuxml2argvdata/smartcard-passthrough-unix.x86_64-latest.args b/tests/qemuxml2argvdata/smartcard-passthrough-unix.x86_64-latest.args index 9ce09ff962..5b1e4e6161 100644 --- a/tests/qemuxml2argvdata/smartcard-passthrough-unix.x86_64-latest.args +++ b/tests/qemuxml2argvdata/smartcard-passthrough-unix.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/usb-redir-unix.x86_64-latest.args b/tests/qemuxml2argvdata/usb-redir-unix.x86_64-latest.args index 266d92b309..f8b98899c5 100644 --- a/tests/qemuxml2argvdata/usb-redir-unix.x86_64-latest.args +++ b/tests/qemuxml2argvdata/usb-redir-unix.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.args b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.args index 7c4d2fe34d..e6e7ab3b6a 100644 --- a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.args +++ b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -name guest=guest,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-guest/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off \ +-machine pc,usb=off,dump-guest-core=off \ +-accel kvm \ -cpu qemu64 \ -m 14336 \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/virtio-rng-builtin.x86_64-5.2.0.args b/tests/qemuxml2argvdata/virtio-rng-builtin.x86_64-5.2.0.args index 11cf01cd30..b22452dee7 100644 --- a/tests/qemuxml2argvdata/virtio-rng-builtin.x86_64-5.2.0.args +++ b/tests/qemuxml2argvdata/virtio-rng-builtin.x86_64-5.2.0.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-i440fx-5.2,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc-i440fx-5.2,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object memory-backend-ram,id=pc.ram,size=224395264 \ diff --git a/tests/qemuxml2argvdata/virtio-rng-builtin.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-rng-builtin.x86_64-latest.args index a3eff223b3..a0aeb74319 100644 --- a/tests/qemuxml2argvdata/virtio-rng-builtin.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-rng-builtin.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/virtio-rng-egd-unix.x86_64-5.2.0.args b/tests/qemuxml2argvdata/virtio-rng-egd-unix.x86_64-5.2.0.args index bc23c6838b..def06e7cd3 100644 --- a/tests/qemuxml2argvdata/virtio-rng-egd-unix.x86_64-5.2.0.args +++ b/tests/qemuxml2argvdata/virtio-rng-egd-unix.x86_64-5.2.0.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc-i440fx-5.2,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc-i440fx-5.2,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object memory-backend-ram,id=pc.ram,size=224395264 \ diff --git a/tests/qemuxml2argvdata/virtio-rng-egd-unix.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-rng-egd-unix.x86_64-latest.args index 51f6c22d0e..b5611e9fe4 100644 --- a/tests/qemuxml2argvdata/virtio-rng-egd-unix.x86_64-latest.args +++ b/tests/qemuxml2argvdata/virtio-rng-egd-unix.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args index bbbd0ad05c..114cc06f46 100644 --- a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args +++ b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -name guest=guest,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-guest/master-key.aes"}' \ --machine pc-i440fx-4.2,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc-i440fx-4.2,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 4096 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":4294967296}' \ diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args index dbeb0c87a6..0368ecc699 100644 --- a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args +++ b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args @@ -10,7 +10,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \ -name guest=guest,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-guest/master-key.aes"}' \ --machine pc-q35-4.2,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc-q35-4.2,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-accel kvm \ -cpu qemu64 \ -m 4096 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":4294967296}' \ -- 2.27.0

On Sat, Nov 20, 2021 at 03:20:46 -0500, huangy81@chinatelecom.cn wrote:
From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
QEMU greater than 2.9.0 support '-accel' option, change the way of assembling commandline from "accel=kvm" to "-accel kvm" when specifying accelerator.
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> ---
[...]
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3108bdd581..a8f73c2d3e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7027,6 +7027,23 @@ qemuBuildNameCommandLine(virCommand *cmd, return 0; }
+static void +qemuBuildAccelCommandLineKvmOptions(virCommand *cmd, + const virDomainDef *def) +{ + /* + * only handle the kvm case, tcg case use the legacy style + * not that either kvm or tcg can be specified by libvirt + * so do not worry about the conflict of specifying both + * */ + if ((virDomainVirtType)def->virtType == VIR_DOMAIN_VIRT_KVM) { + g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; + virCommandAddArg(cmd, "-accel"); + virBufferAddLit(&buf, "kvm"); + virCommandAddArgBuffer(cmd, &buf); + } +}
Michal's patch that I referenced in my previous reply seems to be a bit better and more extensible. I'd prefer if we go with that one.

在 2021/11/22 16:43, Peter Krempa 写道:
On Sat, Nov 20, 2021 at 03:20:46 -0500, huangy81@chinatelecom.cn wrote:
From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
QEMU greater than 2.9.0 support '-accel' option, change the way of assembling commandline from "accel=kvm" to "-accel kvm" when specifying accelerator.
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> ---
[...]
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3108bdd581..a8f73c2d3e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7027,6 +7027,23 @@ qemuBuildNameCommandLine(virCommand *cmd, return 0; }
+static void +qemuBuildAccelCommandLineKvmOptions(virCommand *cmd, + const virDomainDef *def) +{ + /* + * only handle the kvm case, tcg case use the legacy style + * not that either kvm or tcg can be specified by libvirt + * so do not worry about the conflict of specifying both + * */ + if ((virDomainVirtType)def->virtType == VIR_DOMAIN_VIRT_KVM) { + g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; + virCommandAddArg(cmd, "-accel"); + virBufferAddLit(&buf, "kvm"); + virCommandAddArgBuffer(cmd, &buf); + } +}
Michal's patch that I referenced in my previous reply seems to be a bit better and more extensible. I'd prefer if we go with that one.
Sounds good, i'll rebase this commit. -- Best regard Hyman Huang(黄勇)

From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> introduce dirty_ring_size in struct "_virDomainDef" to hold the ring size configured by user, and pass dirty_ring_size when building qemu commandline if dirty ring feature enabled. Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> --- src/conf/domain_conf.c | 76 ++++++++++++++++++++++++++++++++++++++++- src/conf/domain_conf.h | 4 +++ src/qemu/qemu_command.c | 3 ++ 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index deb32b3f6b..80a124557e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -205,6 +205,7 @@ VIR_ENUM_IMPL(virDomainKVM, "hint-dedicated", "poll-control", "pv-ipi", + "dirty-ring", ); VIR_ENUM_IMPL(virDomainXen, @@ -4826,6 +4827,18 @@ virDomainDefPostParseMemtune(virDomainDef *def) } +static void +virDomainDefPostParseFeatures(virDomainDef *def) +{ + if (def->features[VIR_DOMAIN_FEATURE_KVM] == VIR_TRISTATE_SWITCH_ON && + def->kvm_features[VIR_DOMAIN_KVM_DIRTY_RING] == VIR_TRISTATE_SWITCH_ON && + def->dirty_ring_size == 0) { + /* set 4096 as default size if dirty ring size not congfigured */ + def->dirty_ring_size = 4096; + } +} + + static int virDomainDefAddConsoleCompat(virDomainDef *def) { @@ -6062,6 +6075,8 @@ virDomainDefPostParseCommon(virDomainDef *def, virDomainDefPostParseMemtune(def); + virDomainDefPostParseFeatures(def); + if (virDomainDefRejectDuplicateControllers(def) < 0) return -1; @@ -17566,8 +17581,10 @@ virDomainFeaturesHyperVDefParse(virDomainDef *def, static int virDomainFeaturesKVMDefParse(virDomainDef *def, + xmlXPathContextPtr ctxt, xmlNodePtr node) { + xmlNodePtr tmp_node = ctxt->node; def->features[VIR_DOMAIN_FEATURE_KVM] = VIR_TRISTATE_SWITCH_ON; node = xmlFirstElementChild(node); @@ -17589,9 +17606,37 @@ virDomainFeaturesKVMDefParse(virDomainDef *def, def->kvm_features[feature] = value; + /* dirty ring feature should parse size property */ + if ((virDomainKVM) feature == VIR_DOMAIN_KVM_DIRTY_RING) { + if (((virDomainKVM) feature) == VIR_DOMAIN_KVM_DIRTY_RING && + value == VIR_TRISTATE_SWITCH_ON) { + ctxt->node = node; + + if (virXMLPropString(node, "size")) { + if (virXPathUInt("string(./@size)", ctxt, + &def->dirty_ring_size) < 0) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("invalid number of dirty ring size")); + return -1; + } + + if ((def->dirty_ring_size & (def->dirty_ring_size - 1)) != 0 || + def->dirty_ring_size < 1024 || + def->dirty_ring_size > 65536) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("dirty ring must be power of 2 " + "and ranges [1024, 65536]")); + return -1; + } + } + } + } + node = xmlNextElementSibling(node); } + ctxt->node = tmp_node; + return 0; } @@ -17741,7 +17786,7 @@ virDomainFeaturesDefParse(virDomainDef *def, break; case VIR_DOMAIN_FEATURE_KVM: - if (virDomainFeaturesKVMDefParse(def, nodes[i]) < 0) + if (virDomainFeaturesKVMDefParse(def, ctxt, nodes[i]) < 0) return -1; break; @@ -21836,7 +21881,27 @@ virDomainDefFeaturesCheckABIStability(virDomainDef *src, virTristateSwitchTypeToString(dst->kvm_features[i])); return false; } + break; + case VIR_DOMAIN_KVM_DIRTY_RING: + if (src->kvm_features[i] != dst->kvm_features[i]) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("State of KVM feature '%s' differs: " + "source: '%s', destination: '%s'"), + virDomainKVMTypeToString(i), + virTristateSwitchTypeToString(src->kvm_features[i]), + virTristateSwitchTypeToString(dst->kvm_features[i])); + return false; + } + + if (src->dirty_ring_size != dst->dirty_ring_size) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("dirty ring size of KVM feature '%s' differs: " + "source: '%d', destination: '%d'"), + virDomainKVMTypeToString(i), + src->dirty_ring_size, dst->dirty_ring_size); + return false; + } break; case VIR_DOMAIN_KVM_LAST: @@ -27884,6 +27949,15 @@ virDomainDefFormatFeatures(virBuffer *buf, def->kvm_features[j])); break; + case VIR_DOMAIN_KVM_DIRTY_RING: + if (def->kvm_features[j] != VIR_TRISTATE_SWITCH_ABSENT) { + virBufferAsprintf(&childBuf, "<%s state='%s' size='%d'/>\n", + virDomainKVMTypeToString(j), + virTristateSwitchTypeToString(def->kvm_features[j]), + def->dirty_ring_size); + } + break; + case VIR_DOMAIN_KVM_LAST: break; } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 8634960313..026edde88f 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2084,6 +2084,7 @@ typedef enum { VIR_DOMAIN_KVM_DEDICATED, VIR_DOMAIN_KVM_POLLCONTROL, VIR_DOMAIN_KVM_PVIPI, + VIR_DOMAIN_KVM_DIRTY_RING, VIR_DOMAIN_KVM_LAST } virDomainKVM; @@ -2933,6 +2934,9 @@ struct _virDomainDef { should be re-run before starting */ unsigned int scsiBusMaxUnit; + + /* size of dirty ring for each vcpu */ + unsigned int dirty_ring_size; }; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a8f73c2d3e..145596d11a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6860,6 +6860,9 @@ qemuBuildCpuCommandLine(virCommand *cmd, virBufferAddLit(&buf, ",kvm-pv-ipi=off"); break; + case VIR_DOMAIN_KVM_DIRTY_RING: + break; + case VIR_DOMAIN_KVM_LAST: break; } -- 2.27.0

On Sat, Nov 20, 2021 at 03:20:47 -0500, huangy81@chinatelecom.cn wrote:
From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
introduce dirty_ring_size in struct "_virDomainDef" to hold the ring size configured by user, and pass dirty_ring_size when building qemu commandline if dirty ring feature enabled.
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> --- src/conf/domain_conf.c | 76 ++++++++++++++++++++++++++++++++++++++++- src/conf/domain_conf.h | 4 +++ src/qemu/qemu_command.c | 3 ++ 3 files changed, 82 insertions(+), 1 deletion(-)
[...]
@@ -4826,6 +4827,18 @@ virDomainDefPostParseMemtune(virDomainDef *def) }
+static void +virDomainDefPostParseFeatures(virDomainDef *def) +{ + if (def->features[VIR_DOMAIN_FEATURE_KVM] == VIR_TRISTATE_SWITCH_ON && + def->kvm_features[VIR_DOMAIN_KVM_DIRTY_RING] == VIR_TRISTATE_SWITCH_ON && + def->dirty_ring_size == 0) { + /* set 4096 as default size if dirty ring size not congfigured */
Instead of this quite obvious thing I'd prefer a justification of why this setting is done in the global post-parse function rather than the qemu specific one. If there is no good reason to have it globally, please move it to the qemu-specific one.
+ def->dirty_ring_size = 4096; + } +}
[...]
@@ -17566,8 +17581,10 @@ virDomainFeaturesHyperVDefParse(virDomainDef *def,
static int virDomainFeaturesKVMDefParse(virDomainDef *def, + xmlXPathContextPtr ctxt, xmlNodePtr node) { + xmlNodePtr tmp_node = ctxt->node;
We have an established approach for resetting the XPath context. Please use it, as ...[1].
def->features[VIR_DOMAIN_FEATURE_KVM] = VIR_TRISTATE_SWITCH_ON;
node = xmlFirstElementChild(node); @@ -17589,9 +17606,37 @@ virDomainFeaturesKVMDefParse(virDomainDef *def,
def->kvm_features[feature] = value;
+ /* dirty ring feature should parse size property */ + if ((virDomainKVM) feature == VIR_DOMAIN_KVM_DIRTY_RING) { + if (((virDomainKVM) feature) == VIR_DOMAIN_KVM_DIRTY_RING && + value == VIR_TRISTATE_SWITCH_ON) { + ctxt->node = node; + + if (virXMLPropString(node, "size")) {
virXMLPropString returns an allocated string, so this is leaking memory.
+ if (virXPathUInt("string(./@size)", ctxt, + &def->dirty_ring_size) < 0) {
If you fetch the 'size' attribute via virXMLPropString there's no need to re-parse it again using XPath. In fact you can avoid dragging xpath into this function altogether.
+ virReportError(VIR_ERR_XML_ERROR, "%s", + _("invalid number of dirty ring size")); + return -1;
... [1] on this error path it's not fixed.
+ } + + if ((def->dirty_ring_size & (def->dirty_ring_size - 1)) != 0 ||
We have a function/macro for checking power-of-two.
+ def->dirty_ring_size < 1024 || + def->dirty_ring_size > 65536) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("dirty ring must be power of 2 " + "and ranges [1024, 65536]"));
Also per coding style error messages are not to be broken up. Additionally, is this a qemu-specific range?
+ return -1; + } + } + } + } + node = xmlNextElementSibling(node); }
+ ctxt->node = tmp_node; + return 0; }
[...]

在 2021/11/22 16:50, Peter Krempa 写道:
On Sat, Nov 20, 2021 at 03:20:47 -0500, huangy81@chinatelecom.cn wrote:
From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
introduce dirty_ring_size in struct "_virDomainDef" to hold the ring size configured by user, and pass dirty_ring_size when building qemu commandline if dirty ring feature enabled.
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> --- src/conf/domain_conf.c | 76 ++++++++++++++++++++++++++++++++++++++++- src/conf/domain_conf.h | 4 +++ src/qemu/qemu_command.c | 3 ++ 3 files changed, 82 insertions(+), 1 deletion(-)
[...]
@@ -4826,6 +4827,18 @@ virDomainDefPostParseMemtune(virDomainDef *def) }
+static void +virDomainDefPostParseFeatures(virDomainDef *def) +{ + if (def->features[VIR_DOMAIN_FEATURE_KVM] == VIR_TRISTATE_SWITCH_ON && + def->kvm_features[VIR_DOMAIN_KVM_DIRTY_RING] == VIR_TRISTATE_SWITCH_ON && + def->dirty_ring_size == 0) { + /* set 4096 as default size if dirty ring size not congfigured */
Instead of this quite obvious thing I'd prefer a justification of why this setting is done in the global post-parse function rather than the qemu specific one. If there is no good reason to have it globally, please move it to the qemu-specific one. Ok, i'll move it into virDomainFeaturesKVMDefParse and parse it once for all
+ def->dirty_ring_size = 4096; + } +}
[...]
@@ -17566,8 +17581,10 @@ virDomainFeaturesHyperVDefParse(virDomainDef *def,
static int virDomainFeaturesKVMDefParse(virDomainDef *def, + xmlXPathContextPtr ctxt, xmlNodePtr node) { + xmlNodePtr tmp_node = ctxt->node;
We have an established approach for resetting the XPath context. Please use it, as ...[1]. Ok
def->features[VIR_DOMAIN_FEATURE_KVM] = VIR_TRISTATE_SWITCH_ON;
node = xmlFirstElementChild(node); @@ -17589,9 +17606,37 @@ virDomainFeaturesKVMDefParse(virDomainDef *def,
def->kvm_features[feature] = value;
+ /* dirty ring feature should parse size property */ + if ((virDomainKVM) feature == VIR_DOMAIN_KVM_DIRTY_RING) { + if (((virDomainKVM) feature) == VIR_DOMAIN_KVM_DIRTY_RING && + value == VIR_TRISTATE_SWITCH_ON) { + ctxt->node = node; + + if (virXMLPropString(node, "size")) {
virXMLPropString returns an allocated string, so this is leaking memory

On Sat, Nov 20, 2021 at 03:20:47 -0500, huangy81@chinatelecom.cn wrote:
From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
introduce dirty_ring_size in struct "_virDomainDef" to hold the ring size configured by user, and pass dirty_ring_size when building qemu commandline if dirty ring feature enabled.
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> --- src/conf/domain_conf.c | 76 ++++++++++++++++++++++++++++++++++++++++- src/conf/domain_conf.h | 4 +++ src/qemu/qemu_command.c | 3 ++ 3 files changed, 82 insertions(+), 1 deletion(-)
[...]
@@ -27884,6 +27949,15 @@ virDomainDefFormatFeatures(virBuffer *buf, def->kvm_features[j])); break;
+ case VIR_DOMAIN_KVM_DIRTY_RING: + if (def->kvm_features[j] != VIR_TRISTATE_SWITCH_ABSENT) { + virBufferAsprintf(&childBuf, "<%s state='%s' size='%d'/>\n", + virDomainKVMTypeToString(j), + virTristateSwitchTypeToString(def->kvm_features[j]), + def->dirty_ring_size); + } + break; + case VIR_DOMAIN_KVM_LAST: break; }
[...]
@@ -2933,6 +2934,9 @@ struct _virDomainDef { should be re-run before starting */
unsigned int scsiBusMaxUnit; + + /* size of dirty ring for each vcpu */ + unsigned int dirty_ring_size; };
One more thing. You are extending the XML in this commit. This means that the new element also must be documented here and this commit doesn't have any docs. Additionally you will likely need addition to the XML schema. Test XMLs are also required, but they can be added after the implementation. I'll check whether that is happening.

在 2021/11/22 16:54, Peter Krempa 写道:
On Sat, Nov 20, 2021 at 03:20:47 -0500, huangy81@chinatelecom.cn wrote:
From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
introduce dirty_ring_size in struct "_virDomainDef" to hold the ring size configured by user, and pass dirty_ring_size when building qemu commandline if dirty ring feature enabled.
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> --- src/conf/domain_conf.c | 76 ++++++++++++++++++++++++++++++++++++++++- src/conf/domain_conf.h | 4 +++ src/qemu/qemu_command.c | 3 ++ 3 files changed, 82 insertions(+), 1 deletion(-)
[...]
@@ -27884,6 +27949,15 @@ virDomainDefFormatFeatures(virBuffer *buf, def->kvm_features[j])); break;
+ case VIR_DOMAIN_KVM_DIRTY_RING: + if (def->kvm_features[j] != VIR_TRISTATE_SWITCH_ABSENT) { + virBufferAsprintf(&childBuf, "<%s state='%s' size='%d'/>\n", + virDomainKVMTypeToString(j), + virTristateSwitchTypeToString(def->kvm_features[j]), + def->dirty_ring_size); + } + break; + case VIR_DOMAIN_KVM_LAST: break; }
[...]
@@ -2933,6 +2934,9 @@ struct _virDomainDef { should be re-run before starting */
unsigned int scsiBusMaxUnit; + + /* size of dirty ring for each vcpu */ + unsigned int dirty_ring_size; };
One more thing. You are extending the XML in this commit. This means that the new element also must be documented here and this commit doesn't have any docs.
Additionally you will likely need addition to the XML schema.
Test XMLs are also required, but they can be added after the implementation. I'll check whether that is happening.
Ok, i'll post above things next version

From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> dirty ring feature was introduced in qemu-6.1, this patch add corresponding feature named 'dirty-ring', which enable dirty ring feature when starting vm. to enable the feature, libvirt add "-accel dirty-ring-size=xxx" to QEMU command line, the following XML needs to be added to the guest's domain description: <features> <kvm> <dirty-ring state='on' size='xxx'> </kvm> </features> if property "state=on" but property "size" not be configured, set default ring size with 4096. since dirty ring can only be enabled by specifying "-accel" option and do not support the legacy style, it seems that there's no other way to work around this, so we use "-accel" option to specify accelerator instead of "-machine" when building qemu commandline. details about the qemu "-accel" option: https://lore.kernel.org/qemu-devel/3aa73987-40e8-3619-0723-9f17f73850bd@redh... Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> --- docs/formatdomain.rst | 18 ++++++++++-------- docs/schemas/domaincommon.rng | 10 ++++++++++ src/qemu/qemu_command.c | 6 ++++++ 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index eb8c973cf1..ea69b61c70 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -1843,6 +1843,7 @@ Hypervisors may allow certain CPU / machine features to be toggled on/off. <hint-dedicated state='on'/> <poll-control state='on'/> <pv-ipi state='off'/> + <dirty-ring state='on' size='4096'/> </kvm> <xen> <e820_host state='on'/> @@ -1925,14 +1926,15 @@ are: ``kvm`` Various features to change the behavior of the KVM hypervisor. - ============== ============================================================================ ======= ============================ - Feature Description Value Since - ============== ============================================================================ ======= ============================ - hidden Hide the KVM hypervisor from standard MSR based discovery on, off :since:`1.2.8 (QEMU 2.1.0)` - hint-dedicated Allows a guest to enable optimizations when running on dedicated vCPUs on, off :since:`5.7.0 (QEMU 2.12.0)` - poll-control Decrease IO completion latency by introducing a grace period of busy waiting on, off :since:`6.10.0 (QEMU 4.2)` - pv-ipi Paravirtualized send IPIs on, off :since:`7.10.0 (QEMU 3.1)` - ============== ============================================================================ ======= ============================ + ============== ============================================================================ ====================================================== ============================ + Feature Description Value Since + ============== ============================================================================ ====================================================== ============================ + hidden Hide the KVM hypervisor from standard MSR based discovery on, off :since:`1.2.8 (QEMU 2.1.0)` + hint-dedicated Allows a guest to enable optimizations when running on dedicated vCPUs on, off :since:`5.7.0 (QEMU 2.12.0)` + poll-control Decrease IO completion latency by introducing a grace period of busy waiting on, off :since:`6.10.0 (QEMU 4.2)` + pv-ipi Paravirtualized send IPIs on, off :since:`7.10.0 (QEMU 3.1)` + dirty-ring Enable dirty ring feature on, off; size - must be power of 2, range [1024,65536] :since:`7.10.0 (QEMU 6.1)` + ============== ============================================================================ ====================================================== ============================ ``xen`` Various features to change the behavior of the Xen hypervisor. diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index f01b7a6470..5f9fe3cc58 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -7212,6 +7212,16 @@ <ref name="featurestate"/> </element> </optional> + <optional> + <element name="dirty-ring"> + <ref name="featurestate"/> + <optional> + <attribute name="size"> + <data type="unsignedInt"/> + </attribute> + </optional> + </element> + </optional> </interleave> </element> </define> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 145596d11a..863876bfae 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7043,6 +7043,12 @@ qemuBuildAccelCommandLineKvmOptions(virCommand *cmd, g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; virCommandAddArg(cmd, "-accel"); virBufferAddLit(&buf, "kvm"); + + if (def->features[VIR_DOMAIN_FEATURE_KVM] == VIR_TRISTATE_SWITCH_ON && + def->kvm_features[VIR_DOMAIN_KVM_DIRTY_RING] == VIR_TRISTATE_SWITCH_ON) { + virBufferAsprintf(&buf, ",dirty-ring-size=%d", def->dirty_ring_size); + } + virCommandAddArgBuffer(cmd, &buf); } } -- 2.27.0

On Sat, Nov 20, 2021 at 03:20:48 -0500, huangy81@chinatelecom.cn wrote:
From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
dirty ring feature was introduced in qemu-6.1, this patch add corresponding feature named 'dirty-ring', which enable dirty ring feature when starting vm.
to enable the feature, libvirt add "-accel dirty-ring-size=xxx" to QEMU command line, the following XML needs to be added to the guest's domain description:
<features> <kvm> <dirty-ring state='on' size='xxx'> </kvm> </features>
if property "state=on" but property "size" not be configured, set default ring size with 4096.
since dirty ring can only be enabled by specifying "-accel" option and do not support the legacy style, it seems that there's no other way to work around this, so we use "-accel" option to specify accelerator instead of "-machine" when building qemu commandline.
details about the qemu "-accel" option: https://lore.kernel.org/qemu-devel/3aa73987-40e8-3619-0723-9f17f73850bd@redh...
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> --- docs/formatdomain.rst | 18 ++++++++++-------- docs/schemas/domaincommon.rng | 10 ++++++++++ src/qemu/qemu_command.c | 6 ++++++ 3 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index eb8c973cf1..ea69b61c70 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -1843,6 +1843,7 @@ Hypervisors may allow certain CPU / machine features to be toggled on/off. <hint-dedicated state='on'/> <poll-control state='on'/> <pv-ipi state='off'/> + <dirty-ring state='on' size='4096'/> </kvm> <xen> <e820_host state='on'/> @@ -1925,14 +1926,15 @@ are: ``kvm`` Various features to change the behavior of the KVM hypervisor.
- ============== ============================================================================ ======= ============================ - Feature Description Value Since - ============== ============================================================================ ======= ============================ - hidden Hide the KVM hypervisor from standard MSR based discovery on, off :since:`1.2.8 (QEMU 2.1.0)` - hint-dedicated Allows a guest to enable optimizations when running on dedicated vCPUs on, off :since:`5.7.0 (QEMU 2.12.0)` - poll-control Decrease IO completion latency by introducing a grace period of busy waiting on, off :since:`6.10.0 (QEMU 4.2)` - pv-ipi Paravirtualized send IPIs on, off :since:`7.10.0 (QEMU 3.1)` - ============== ============================================================================ ======= ============================ + ============== ============================================================================ ====================================================== ============================ + Feature Description Value Since + ============== ============================================================================ ====================================================== ============================ + hidden Hide the KVM hypervisor from standard MSR based discovery on, off :since:`1.2.8 (QEMU 2.1.0)` + hint-dedicated Allows a guest to enable optimizations when running on dedicated vCPUs on, off :since:`5.7.0 (QEMU 2.12.0)` + poll-control Decrease IO completion latency by introducing a grace period of busy waiting on, off :since:`6.10.0 (QEMU 4.2)` + pv-ipi Paravirtualized send IPIs on, off :since:`7.10.0 (QEMU 3.1)` + dirty-ring Enable dirty ring feature on, off; size - must be power of 2, range [1024,65536] :since:`7.10.0 (QEMU 6.1)` + ============== ============================================================================ ====================================================== ============================
``xen`` Various features to change the behavior of the Xen hypervisor.
Okay, so both hunks belong actually to the previous commit.
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index f01b7a6470..5f9fe3cc58 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -7212,6 +7212,16 @@ <ref name="featurestate"/> </element> </optional> + <optional> + <element name="dirty-ring"> + <ref name="featurestate"/> + <optional> + <attribute name="size"> + <data type="unsignedInt"/> + </attribute> + </optional> + </element> + </optional> </interleave> </element> </define>
And this one too.
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 145596d11a..863876bfae 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7043,6 +7043,12 @@ qemuBuildAccelCommandLineKvmOptions(virCommand *cmd, g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; virCommandAddArg(cmd, "-accel"); virBufferAddLit(&buf, "kvm"); + + if (def->features[VIR_DOMAIN_FEATURE_KVM] == VIR_TRISTATE_SWITCH_ON && + def->kvm_features[VIR_DOMAIN_KVM_DIRTY_RING] == VIR_TRISTATE_SWITCH_ON) { + virBufferAsprintf(&buf, ",dirty-ring-size=%d", def->dirty_ring_size); + } + virCommandAddArgBuffer(cmd, &buf); } }
A test case is needed both for qemuxml2argvtest and qemuxml2xmltest.

在 2021/11/22 16:55, Peter Krempa 写道:
On Sat, Nov 20, 2021 at 03:20:48 -0500, huangy81@chinatelecom.cn wrote:
From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
dirty ring feature was introduced in qemu-6.1, this patch add corresponding feature named 'dirty-ring', which enable dirty ring feature when starting vm.
to enable the feature, libvirt add "-accel dirty-ring-size=xxx" to QEMU command line, the following XML needs to be added to the guest's domain description:
<features> <kvm> <dirty-ring state='on' size='xxx'> </kvm> </features>
if property "state=on" but property "size" not be configured, set default ring size with 4096.
since dirty ring can only be enabled by specifying "-accel" option and do not support the legacy style, it seems that there's no other way to work around this, so we use "-accel" option to specify accelerator instead of "-machine" when building qemu commandline.
details about the qemu "-accel" option: https://lore.kernel.org/qemu-devel/3aa73987-40e8-3619-0723-9f17f73850bd@redh...
Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> --- docs/formatdomain.rst | 18 ++++++++++-------- docs/schemas/domaincommon.rng | 10 ++++++++++ src/qemu/qemu_command.c | 6 ++++++ 3 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index eb8c973cf1..ea69b61c70 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -1843,6 +1843,7 @@ Hypervisors may allow certain CPU / machine features to be toggled on/off. <hint-dedicated state='on'/> <poll-control state='on'/> <pv-ipi state='off'/> + <dirty-ring state='on' size='4096'/> </kvm> <xen> <e820_host state='on'/> @@ -1925,14 +1926,15 @@ are: ``kvm`` Various features to change the behavior of the KVM hypervisor.
- ============== ============================================================================ ======= ============================ - Feature Description Value Since - ============== ============================================================================ ======= ============================ - hidden Hide the KVM hypervisor from standard MSR based discovery on, off :since:`1.2.8 (QEMU 2.1.0)` - hint-dedicated Allows a guest to enable optimizations when running on dedicated vCPUs on, off :since:`5.7.0 (QEMU 2.12.0)` - poll-control Decrease IO completion latency by introducing a grace period of busy waiting on, off :since:`6.10.0 (QEMU 4.2)` - pv-ipi Paravirtualized send IPIs on, off :since:`7.10.0 (QEMU 3.1)` - ============== ============================================================================ ======= ============================ + ============== ============================================================================ ====================================================== ============================ + Feature Description Value Since + ============== ============================================================================ ====================================================== ============================ + hidden Hide the KVM hypervisor from standard MSR based discovery on, off :since:`1.2.8 (QEMU 2.1.0)` + hint-dedicated Allows a guest to enable optimizations when running on dedicated vCPUs on, off :since:`5.7.0 (QEMU 2.12.0)` + poll-control Decrease IO completion latency by introducing a grace period of busy waiting on, off :since:`6.10.0 (QEMU 4.2)` + pv-ipi Paravirtualized send IPIs on, off :since:`7.10.0 (QEMU 3.1)` + dirty-ring Enable dirty ring feature on, off; size - must be power of 2, range [1024,65536] :since:`7.10.0 (QEMU 6.1)` + ============== ============================================================================ ====================================================== ============================
``xen`` Various features to change the behavior of the Xen hypervisor.
Okay, so both hunks belong actually to the previous commit.
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index f01b7a6470..5f9fe3cc58 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -7212,6 +7212,16 @@ <ref name="featurestate"/> </element> </optional> + <optional> + <element name="dirty-ring"> + <ref name="featurestate"/> + <optional> + <attribute name="size"> + <data type="unsignedInt"/> + </attribute> + </optional> + </element> + </optional> </interleave> </element> </define>
And this one too.
Ok, i'll squash into the previous commit
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 145596d11a..863876bfae 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7043,6 +7043,12 @@ qemuBuildAccelCommandLineKvmOptions(virCommand *cmd, g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER; virCommandAddArg(cmd, "-accel"); virBufferAddLit(&buf, "kvm"); + + if (def->features[VIR_DOMAIN_FEATURE_KVM] == VIR_TRISTATE_SWITCH_ON && + def->kvm_features[VIR_DOMAIN_KVM_DIRTY_RING] == VIR_TRISTATE_SWITCH_ON) { + virBufferAsprintf(&buf, ",dirty-ring-size=%d", def->dirty_ring_size); + } + virCommandAddArgBuffer(cmd, &buf); } }
A test case is needed both for qemuxml2argvtest and qemuxml2xmltest.
Ok, i'll add a commit for test case implementation

On Sat, Nov 20, 2021 at 03:20:44 -0500, huangy81@chinatelecom.cn wrote:
From: "Hyman Huang(黄勇)" <huangy81@chinatelecom.cn>
Ping for this series.
I still keep thinking the dirty ring feature is something good to have for libvirt.
qemu-6.1 has supported dirty ring feature and followed up with the commit 0e21bf24 "support dirtyrate at the granualrity of vcpu", which is a typical usage scenario of dirty ring. another usage scenario may be the implementation of per-vcpu auto-converge during live migration which is already being reviewed. so we can make full use of dirty ring feature if libvirt supports. and any corrections and comments about this series would be very appreciated.
Please review, Thanks!
Hyman
v6 - rebase on master
v5,v4: blank, just make v6 be the the latest version.
Umm, what does this mean? I didn't find v4 or v5 posted on the list.

On Sat, Nov 20, 2021 at 03:20:44 -0500, huangy81@chinatelecom.cn wrote:
From: "Hyman Huang(黄勇)" <huangy81@chinatelecom.cn>
Ping for this series.
I still keep thinking the dirty ring feature is something good to have for libvirt.
qemu-6.1 has supported dirty ring feature and followed up with the commit 0e21bf24 "support dirtyrate at the granualrity of vcpu", which is a typical usage scenario of dirty ring. another usage scenario may be the implementation of per-vcpu auto-converge during live migration which is already being reviewed. so we can make full use of dirty ring feature if libvirt supports. and any corrections and comments about this series would be very appreciated.
Please review, Thanks!
Hyman
v6 - rebase on master
v5,v4: blank, just make v6 be the the latest version.
Umm, what does this mean? I didn't find v4 or v5 posted on the list. About 10 month ago, i post same title patchset but add the RFC tag。That
在 2021/11/22 22:48, Peter Krempa 写道: patchset was deprecated. https://patchew.org/Libvirt/20210113104244.1661-1-huangy81@chinatelecom.cn/
participants (4)
-
huangy81@chinatelecom.cn
-
Hyman
-
Hyman Huang
-
Peter Krempa