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

From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> 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 ! Best Regards ! Hyman Huang(黄勇) 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 in struct "_virDomainDef" qemu: support dirty ring feature docs/formatdomain.rst | 16 +++-- docs/schemas/domaincommon.rng | 10 +++ src/conf/domain_conf.c | 74 +++++++++++++++++++++- src/conf/domain_conf.h | 4 ++ src/qemu/qemu_capabilities.c | 2 + src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 40 +++++++++++- 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.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 + ...64-default-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 +- .../cpu-Icelake-Server-pconfig.x86_64-3.1.0.args | 3 +- .../cpu-Icelake-Server-pconfig.x86_64-latest.args | 3 +- .../cpu-tsc-frequency.x86_64-4.0.0.args | 3 +- .../cpu-tsc-high-frequency.x86_64-latest.args | 3 +- .../default-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 +- .../hugepages-memaccess3.x86_64-latest.args | 3 +- .../intel-iommu-aw-bits.x86_64-latest.args | 3 +- .../intel-iommu-caching-mode.x86_64-latest.args | 3 +- .../intel-iommu-device-iotlb.x86_64-latest.args | 3 +- .../intel-iommu-eim.x86_64-latest.args | 3 +- ...ty-sev-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 +- ...emfd-memory-default-hugepage.x86_64-latest.args | 3 +- .../memfd-memory-numa.x86_64-latest.args | 3 +- .../memory-hotplug-virtio-pmem.x86_64-5.2.0.args | 3 +- .../memory-hotplug-virtio-pmem.x86_64-latest.args | 3 +- .../os-firmware-bios.x86_64-latest.args | 3 +- ...irmware-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 +- ...4-default-cpu-kvm-pseries-2.7.ppc64-latest.args | 3 +- ...4-default-cpu-kvm-pseries-3.1.ppc64-latest.args | 3 +- ...4-default-cpu-kvm-pseries-4.2.ppc64-latest.args | 3 +- ...efault-cpu-kvm-ccw-virtio-2.7.s390x-latest.args | 3 +- ...efault-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 3 +- .../smartcard-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 +- ...86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args | 3 +- ...6_64-default-cpu-kvm-q35-4.2.x86_64-latest.args | 3 +- 91 files changed, 268 insertions(+), 55 deletions(-) -- 1.8.3.1

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.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 + 40 files changed, 41 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index d1cd8f1..5ee8583 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -636,6 +636,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 405 */ "confidential-guest-support", "query-display-options", + "accel", ); @@ -3246,6 +3247,7 @@ static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = { { "vnc", "display", QEMU_CAPS_VNC_OPTS }, { "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 7944b91..c3f60c4 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -616,6 +616,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ /* 405 */ QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPORT, /* -machine confidential-guest-support */ QEMU_CAPS_QUERY_DISPLAY_OPTIONS, /* 'query-display-options' qmp command present */ + 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 9029a4e..81e10b1 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml @@ -115,6 +115,7 @@ <flag name='fsdev.createmode'/> <flag name='vnc-opts'/> <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 37fb33e..261ef14 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml @@ -196,6 +196,7 @@ <flag name='cpu-max'/> <flag name='vnc-opts'/> <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 a903b46..17524de 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml @@ -164,6 +164,7 @@ <flag name='vnc-opts'/> <flag name='rotation-rate'/> <flag name='input-linux'/> + <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 8981569..65b245f 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml @@ -163,6 +163,7 @@ <flag name='cpu-max'/> <flag name='vnc-opts'/> <flag name='input-linux'/> + <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 8d1e21c..e8268d4 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml @@ -128,6 +128,7 @@ <flag name='vhost-user-blk'/> <flag name='vnc-opts'/> <flag name='input-linux'/> + <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 37aaabe..a870d52 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -207,6 +207,7 @@ <flag name='cpu-max'/> <flag name='vnc-opts'/> <flag name='input-linux'/> + <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 a733043..3e14354 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml @@ -165,6 +165,7 @@ <flag name='cpu-max'/> <flag name='vnc-opts'/> <flag name='input-linux'/> + <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 9b486cd..9efae68 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml @@ -98,6 +98,7 @@ <flag name='vhost-user-blk'/> <flag name='vnc-opts'/> <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 8e89530..8d59aff 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml @@ -98,6 +98,7 @@ <flag name='vhost-user-blk'/> <flag name='vnc-opts'/> <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 dfc1ce8..8967cc7 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml @@ -131,6 +131,7 @@ <flag name='vhost-user-blk'/> <flag name='vnc-opts'/> <flag name='input-linux'/> + <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 f45fd84..11a6f19 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml @@ -213,6 +213,7 @@ <flag name='cpu-max'/> <flag name='vnc-opts'/> <flag name='input-linux'/> + <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 d048349..62a1038 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml @@ -170,6 +170,7 @@ <flag name='cpu-max'/> <flag name='vnc-opts'/> <flag name='input-linux'/> + <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 dcc5f6f..5e87f38 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml @@ -217,6 +217,7 @@ <flag name='vnc-opts'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 2586f69..d47716d 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml @@ -180,6 +180,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 f408805..401c452 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml @@ -187,6 +187,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 8a6c02d..1cb3a7c 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml @@ -179,6 +179,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 3be1d41..ce01709 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml @@ -179,6 +179,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 3f90bf3..e3932bb 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml @@ -143,6 +143,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 7eff082..f87dfb6 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -225,6 +225,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 736b120..bc8237b 100644 --- a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml @@ -232,6 +232,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 b86a35f..403bc5e 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -195,6 +195,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 40a25a0..2fc1210 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -194,6 +194,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 5dbb8fb..d53ef86 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml @@ -156,6 +156,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 8352fd0..293c407 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -243,6 +243,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 c201c55..974d995 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -205,6 +205,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 c02998a..bce67b1 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -213,6 +213,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 95c0f70..a30e43c 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -199,6 +199,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 6a99f4e..a9b212a 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -250,6 +250,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 9e4f2f7..0a0025c 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml @@ -114,6 +114,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 674d984..d33dd81 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -252,6 +252,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 417be4e..1d09c1c 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -209,6 +209,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 4202eb0..4190b1b 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -215,6 +215,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 1409858..e017408 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml @@ -201,6 +201,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 372af71..e7d1f24 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -163,6 +163,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <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 ec3384c..ab0bee9 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -253,6 +253,7 @@ <flag name='rotation-rate'/> <flag name='input-linux'/> <flag name='query-display-options'/> + <flag name='accel'/> <version>5002000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100243</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml index 1806c06..5d3a472 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml @@ -169,6 +169,7 @@ <flag name='input-linux'/> <flag name='confidential-guest-support'/> <flag name='query-display-options'/> + <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 d6198c2..e579d74 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -260,6 +260,7 @@ <flag name='input-linux'/> <flag name='confidential-guest-support'/> <flag name='query-display-options'/> + <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 1937b88..ae207b8 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -260,6 +260,7 @@ <flag name='virtio-vga-gl'/> <flag name='confidential-guest-support'/> <flag name='query-display-options'/> + <flag name='accel'/> <version>6000050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100243</microcodeVersion> -- 1.8.3.1

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 +++++++++++++++++++++- ...64-default-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 ++- .../cpu-Icelake-Server-pconfig.x86_64-3.1.0.args | 3 ++- .../cpu-Icelake-Server-pconfig.x86_64-latest.args | 3 ++- .../cpu-tsc-frequency.x86_64-4.0.0.args | 3 ++- .../cpu-tsc-high-frequency.x86_64-latest.args | 3 ++- .../default-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 ++- .../hugepages-memaccess3.x86_64-latest.args | 3 ++- .../intel-iommu-aw-bits.x86_64-latest.args | 3 ++- .../intel-iommu-caching-mode.x86_64-latest.args | 3 ++- .../intel-iommu-device-iotlb.x86_64-latest.args | 3 ++- .../intel-iommu-eim.x86_64-latest.args | 3 ++- ...ty-sev-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 ++- ...emfd-memory-default-hugepage.x86_64-latest.args | 3 ++- .../memfd-memory-numa.x86_64-latest.args | 3 ++- .../memory-hotplug-virtio-pmem.x86_64-5.2.0.args | 3 ++- .../memory-hotplug-virtio-pmem.x86_64-latest.args | 3 ++- .../os-firmware-bios.x86_64-latest.args | 3 ++- ...irmware-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 ++- ...4-default-cpu-kvm-pseries-2.7.ppc64-latest.args | 3 ++- ...4-default-cpu-kvm-pseries-3.1.ppc64-latest.args | 3 ++- ...4-default-cpu-kvm-pseries-4.2.ppc64-latest.args | 3 ++- ...efault-cpu-kvm-ccw-virtio-2.7.s390x-latest.args | 3 ++- ...efault-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 3 ++- .../smartcard-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 ++- ...86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args | 3 ++- ...6_64-default-cpu-kvm-q35-4.2.x86_64-latest.args | 3 ++- 47 files changed, 122 insertions(+), 47 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index ea51369..81fe67e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6758,6 +6758,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, @@ -6779,8 +6796,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: @@ -10402,6 +10427,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 f45b882..9de6595 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 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 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 fccf44c..b7153a0 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 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 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 5405419..cebf8e5 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 d2ec47c..ad1626a 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 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 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 8fbbebc..06a3c9d 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 26ec8b9..5c9a0fd 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 a92dc2f..99000c0 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-tsc-frequency.x86_64-4.0.0.args b/tests/qemuxml2argvdata/cpu-tsc-frequency.x86_64-4.0.0.args index cc78591..180a217 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=3504000000 \ -m 214 \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/cpu-tsc-high-frequency.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-tsc-high-frequency.x86_64-latest.args index c39817a..029c01e 100644 --- a/tests/qemuxml2argvdata/cpu-tsc-high-frequency.x86_64-latest.args +++ b/tests/qemuxml2argvdata/cpu-tsc-high-frequency.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 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,svm=off,npt=off,nrip-save=off,invtsc=on,tsc-frequency=4567890000 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args b/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args index a1f65ba..b1f09e7 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 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 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 f16a147..90d508f 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 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 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 5bb9353..417bfc8 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 659cca4..aca93dd 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 5c81dac..44a3b96 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 84a7309..e17f317 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/hugepages-memaccess3.x86_64-latest.args b/tests/qemuxml2argvdata/hugepages-memaccess3.x86_64-latest.args index f6c5e11..3913e24 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 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,svm=off,npt=off,nrip-save=off \ -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 48535d2..985253b 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 902d00f..9d434d4 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 7e6b0a7..20407b8 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 c04ce04..f730b2f 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-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 4e281e2..40bf90b 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=sev0 \ +-machine pc-1.0,usb=off,dump-guest-core=off,memory-encryption=sev0 \ +-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 40f79d3..a6cbafe 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=sev0 \ +-machine pc-i440fx-2.12,usb=off,dump-guest-core=off,memory-encryption=sev0 \ +-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 f333071..9413c8f 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=sev0,memory-backend=pc.ram \ +-machine pc-i440fx-6.0,usb=off,dump-guest-core=off,confidential-guest-support=sev0,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 5e54908..9dea9d5 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 5e54908..9dea9d5 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 \ +-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/memory-hotplug-virtio-pmem.x86_64-5.2.0.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args index 969e2db..7a0a59f 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 4b1c173..cb8e3d0 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 957249d..55b5a99 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 99b1d45..2a3e284 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 256377a..ad12893 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 d780775..f8a0b5c 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 dad197b..a6a8dc2 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 dde5d44..1e8baac 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 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 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 a4aaea7..4ea8818 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 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 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 a8b22d3..8e52c88 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 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 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 6eefbb8..7aa2617 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 e20ff87..0a81330 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 da82e3d..11f9128 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 fd969b7..40ca89c 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 6311f8f..60f451e 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 af071df..848429f 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 0edb65a..6c64455 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 1f6da63..306e474 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 36348e0..90ad108 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 a50eb6c..09f6a8d 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 e327dd9..16df84d 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}' \ -- 1.8.3.1

From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> 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. Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> --- src/conf/domain_conf.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++- src/conf/domain_conf.h | 4 +++ src/qemu/qemu_command.c | 3 ++ 3 files changed, 80 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d78f846..d972f1d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -204,6 +204,7 @@ VIR_ENUM_IMPL(virDomainKVM, "hidden", "hint-dedicated", "poll-control", + "dirty-ring", ); VIR_ENUM_IMPL(virDomainXen, @@ -4752,6 +4753,16 @@ 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) @@ -6003,6 +6014,8 @@ virDomainDefPostParseCommon(virDomainDef *def, virDomainDefPostParseMemtune(def); + virDomainDefPostParseFeatures(def); + if (virDomainDefRejectDuplicateControllers(def) < 0) return -1; @@ -17400,8 +17413,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); @@ -17423,9 +17438,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; } @@ -17575,7 +17618,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; @@ -21671,7 +21714,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: @@ -27649,6 +27712,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 f706c49..a479b68 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2058,6 +2058,7 @@ typedef enum { VIR_DOMAIN_KVM_HIDDEN = 0, VIR_DOMAIN_KVM_DEDICATED, VIR_DOMAIN_KVM_POLLCONTROL, + VIR_DOMAIN_KVM_DIRTY_RING, VIR_DOMAIN_KVM_LAST } virDomainKVM; @@ -2882,6 +2883,9 @@ struct _virDomainDef { callbacks failed for a non-critical reason (was not able to fill in some data) and thus should be re-run before starting */ + + /* 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 81fe67e..d1e9bee 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6587,6 +6587,9 @@ qemuBuildCpuCommandLine(virCommand *cmd, virBufferAddLit(&buf, ",kvm-poll-control=on"); break; + case VIR_DOMAIN_KVM_DIRTY_RING: + break; + case VIR_DOMAIN_KVM_LAST: break; } -- 1.8.3.1

From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn> QEMU has introduced a dirty ring feature, 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 | 16 +++++++++------- docs/schemas/domaincommon.rng | 10 ++++++++++ src/qemu/qemu_command.c | 6 ++++++ 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index c6dede0..ffb94bd 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -1820,6 +1820,7 @@ Hypervisors may allow certain CPU / machine features to be toggled on/off. <hidden state='on'/> <hint-dedicated state='on'/> <poll-control state='on'/> + <dirty-ring state='on' size='4096'/> </kvm> <xen> <e820_host state='on'/> @@ -1902,13 +1903,14 @@ 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)` - ============== ============================================================================ ======= ============================ + ============== ============================================================================ ====================================================== ============================ + 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)` + dirty-ring Enable dirty ring feature on, off; size - must be power of 2, range [1024,65536] :since:`7.5.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 5ea14b6..f476719 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -7107,6 +7107,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 d1e9bee..da78873 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6774,6 +6774,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); } } -- 1.8.3.1

ping - hi, what would you think about this patchset ? :) 在 2021/6/25 0:51, huangy81@chinatelecom.cn 写道:
From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
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 !
Best Regards ! Hyman Huang(黄勇)
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 in struct "_virDomainDef" qemu: support dirty ring feature
docs/formatdomain.rst | 16 +++-- docs/schemas/domaincommon.rng | 10 +++ src/conf/domain_conf.c | 74 +++++++++++++++++++++- src/conf/domain_conf.h | 4 ++ src/qemu/qemu_capabilities.c | 2 + src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 40 +++++++++++- 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.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 + ...64-default-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 +- .../cpu-Icelake-Server-pconfig.x86_64-3.1.0.args | 3 +- .../cpu-Icelake-Server-pconfig.x86_64-latest.args | 3 +- .../cpu-tsc-frequency.x86_64-4.0.0.args | 3 +- .../cpu-tsc-high-frequency.x86_64-latest.args | 3 +- .../default-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 +- .../hugepages-memaccess3.x86_64-latest.args | 3 +- .../intel-iommu-aw-bits.x86_64-latest.args | 3 +- .../intel-iommu-caching-mode.x86_64-latest.args | 3 +- .../intel-iommu-device-iotlb.x86_64-latest.args | 3 +- .../intel-iommu-eim.x86_64-latest.args | 3 +- ...ty-sev-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 +- ...emfd-memory-default-hugepage.x86_64-latest.args | 3 +- .../memfd-memory-numa.x86_64-latest.args | 3 +- .../memory-hotplug-virtio-pmem.x86_64-5.2.0.args | 3 +- .../memory-hotplug-virtio-pmem.x86_64-latest.args | 3 +- .../os-firmware-bios.x86_64-latest.args | 3 +- ...irmware-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 +- ...4-default-cpu-kvm-pseries-2.7.ppc64-latest.args | 3 +- ...4-default-cpu-kvm-pseries-3.1.ppc64-latest.args | 3 +- ...4-default-cpu-kvm-pseries-4.2.ppc64-latest.args | 3 +- ...efault-cpu-kvm-ccw-virtio-2.7.s390x-latest.args | 3 +- ...efault-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 3 +- .../smartcard-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 +- ...86_64-default-cpu-kvm-pc-4.2.x86_64-latest.args | 3 +- ...6_64-default-cpu-kvm-q35-4.2.x86_64-latest.args | 3 +- 91 files changed, 268 insertions(+), 55 deletions(-)
participants (2)
-
huangy81@chinatelecom.cn
-
Hyman