Enablement of asynchronous teardown on S390 and add tests for
asynchronous teardown autogeneration support.
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
---
src/qemu/qemu_domain.c | 14 ++++++++
.../qemuhotplug-base-ccw-live+ccw-virtio.xml | 1 +
...with-2-ccw-virtio+ccw-virtio-1-reverse.xml | 1 +
...otplug-base-ccw-live-with-2-ccw-virtio.xml | 1 +
...-with-ccw-virtio+ccw-virtio-2-explicit.xml | 1 +
...-ccw-live-with-ccw-virtio+ccw-virtio-2.xml | 1 +
...uhotplug-base-ccw-live-with-ccw-virtio.xml | 1 +
.../qemuhotplug-base-ccw-live.xml | 1 +
.../balloon-ccw-deflate.s390x-latest.args | 1 +
.../console-sclp.s390x-latest.args | 1 +
.../console-virtio-ccw.s390x-latest.args | 1 +
.../cpu-s390-features.s390x-latest.args | 1 +
.../cpu-s390-zEC12.s390x-latest.args | 1 +
...default-video-type-s390x.s390x-latest.args | 1 +
.../disk-error-policy-s390x.s390x-latest.args | 1 +
.../disk-virtio-ccw-many.s390x-latest.args | 1 +
.../disk-virtio-ccw.s390x-latest.args | 1 +
.../disk-virtio-s390-zpci.s390x-latest.args | 1 +
.../fs9p-ccw.s390x-latest.args | 1 +
...tdev-scsi-vhost-scsi-ccw.s390x-latest.args | 1 +
...tdev-subsys-mdev-vfio-ap.s390x-latest.args | 1 +
...ubsys-mdev-vfio-ccw-boot.s390x-latest.args | 1 +
...dev-subsys-mdev-vfio-ccw.s390x-latest.args | 1 +
...o-zpci-autogenerate-fids.s390x-latest.args | 1 +
...o-zpci-autogenerate-uids.s390x-latest.args | 1 +
...v-vfio-zpci-autogenerate.s390x-latest.args | 1 +
...dev-vfio-zpci-boundaries.s390x-latest.args | 1 +
...vfio-zpci-ccw-memballoon.s390x-latest.args | 1 +
...io-zpci-multidomain-many.s390x-latest.args | 1 +
.../hostdev-vfio-zpci.s390x-latest.args | 1 +
.../input-virtio-ccw.s390x-latest.args | 1 +
...othreads-virtio-scsi-ccw.s390x-latest.args | 1 +
.../launch-security-s390-pv.s390x-latest.args | 1 +
...chine-aeskeywrap-off-cap.s390x-latest.args | 1 +
...hine-aeskeywrap-off-caps.s390x-latest.args | 1 +
...achine-aeskeywrap-on-cap.s390x-latest.args | 1 +
...chine-aeskeywrap-on-caps.s390x-latest.args | 1 +
...chine-deakeywrap-off-cap.s390x-latest.args | 1 +
...hine-deakeywrap-off-caps.s390x-latest.args | 1 +
...achine-deakeywrap-on-cap.s390x-latest.args | 1 +
...chine-deakeywrap-on-caps.s390x-latest.args | 1 +
...achine-keywrap-none-caps.s390x-latest.args | 1 +
.../machine-keywrap-none.s390x-latest.args | 1 +
...machine-loadparm-hostdev.s390x-latest.args | 1 +
...multiple-disks-nets-s390.s390x-latest.args | 1 +
...achine-loadparm-net-s390.s390x-latest.args | 1 +
.../machine-loadparm-s390.s390x-latest.args | 1 +
.../net-virtio-ccw.s390x-latest.args | 1 +
...low-bogus-usb-controller.s390x-latest.args | 1 +
...390-allow-bogus-usb-none.s390x-latest.args | 1 +
...t-cpu-kvm-ccw-virtio-2.7.s390x-latest.args | 1 +
...t-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 1 +
...t-cpu-tcg-ccw-virtio-2.7.s390x-latest.args | 1 +
...t-cpu-tcg-ccw-virtio-4.2.s390x-latest.args | 1 +
...no-async-teardown-autogen.s390x-6.0.0.args | 32 ++++++++++++++++++
...o-async-teardown-autogen.s390x-latest.args | 33 +++++++++++++++++++
.../s390-no-async-teardown-autogen.xml | 18 ++++++++++
.../s390-panic-missing.s390x-latest.args | 1 +
.../s390-panic-no-address.s390x-latest.args | 1 +
.../s390-serial-2.s390x-latest.args | 1 +
.../s390-serial-console.s390x-latest.args | 1 +
.../s390-serial.s390x-latest.args | 1 +
.../s390x-ccw-graphics.s390x-latest.args | 1 +
.../s390x-ccw-headless.s390x-latest.args | 1 +
.../vhost-vsock-ccw-auto.s390x-latest.args | 1 +
.../vhost-vsock-ccw-iommu.s390x-latest.args | 1 +
.../vhost-vsock-ccw-iommu.xml | 3 ++
.../vhost-vsock-ccw.s390x-latest.args | 1 +
.../video-virtio-gpu-ccw.s390x-latest.args | 1 +
.../virtio-rng-ccw.s390x-latest.args | 1 +
.../watchdog-diag288.s390x-latest.args | 1 +
tests/qemuxml2argvtest.c | 2 ++
.../default-video-type-s390x.s390x-latest.xml | 3 ++
.../disk-virtio-s390-zpci.s390x-latest.xml | 3 ++
...stdev-scsi-vhost-scsi-ccw.s390x-latest.xml | 3 ++
...stdev-subsys-mdev-vfio-ap.s390x-latest.xml | 3 ++
...subsys-mdev-vfio-ccw-boot.s390x-latest.xml | 3 ++
...tdev-subsys-mdev-vfio-ccw.s390x-latest.xml | 3 ++
...io-zpci-autogenerate-fids.s390x-latest.xml | 3 ++
...io-zpci-autogenerate-uids.s390x-latest.xml | 3 ++
...ev-vfio-zpci-autogenerate.s390x-latest.xml | 3 ++
...tdev-vfio-zpci-boundaries.s390x-latest.xml | 3 ++
...-vfio-zpci-ccw-memballoon.s390x-latest.xml | 3 ++
...fio-zpci-multidomain-many.s390x-latest.xml | 3 ++
.../hostdev-vfio-zpci.s390x-latest.xml | 3 ++
.../input-virtio-ccw.s390x-latest.xml | 3 ++
...iothreads-disk-virtio-ccw.s390x-latest.xml | 3 ++
...iothreads-virtio-scsi-ccw.s390x-latest.xml | 3 ++
.../machine-loadparm-hostdev.s390x-latest.xml | 3 ++
...-multiple-disks-nets-s390.s390x-latest.xml | 3 ++
...lt-cpu-kvm-ccw-virtio-2.7.s390x-latest.xml | 3 ++
...lt-cpu-kvm-ccw-virtio-4.2.s390x-latest.xml | 3 ++
...lt-cpu-tcg-ccw-virtio-2.7.s390x-latest.xml | 3 ++
...lt-cpu-tcg-ccw-virtio-4.2.s390x-latest.xml | 3 ++
.../s390-defaultconsole.s390x-latest.xml | 3 ++
...-no-async-teardown-autogen.s390x-6.0.0.xml | 25 ++++++++++++++
...no-async-teardown-autogen.s390x-latest.xml | 28 ++++++++++++++++
.../s390-panic-missing.s390x-latest.xml | 3 ++
.../s390-panic-no-address.s390x-latest.xml | 3 ++
.../s390-panic.s390x-latest.xml | 3 ++
.../s390-serial-2.s390x-latest.xml | 3 ++
.../s390-serial-console.s390x-latest.xml | 3 ++
.../s390-serial.s390x-latest.xml | 3 ++
.../s390x-ccw-graphics.s390x-latest.xml | 3 ++
.../s390x-ccw-headless.s390x-latest.xml | 3 ++
.../vhost-vsock-ccw-auto.s390x-latest.xml | 3 ++
.../vhost-vsock-ccw.s390x-latest.xml | 3 ++
...video-virtio-gpu-ccw-auto.s390x-latest.xml | 3 ++
.../video-virtio-gpu-ccw.s390x-latest.xml | 3 ++
tests/qemuxml2xmltest.c | 2 ++
110 files changed, 328 insertions(+)
create mode 100644 tests/qemuxml2argvdata/s390-no-async-teardown-autogen.s390x-6.0.0.args
create mode 100644 tests/qemuxml2argvdata/s390-no-async-teardown-autogen.s390x-latest.args
create mode 100644 tests/qemuxml2argvdata/s390-no-async-teardown-autogen.xml
create mode 100644 tests/qemuxml2xmloutdata/s390-no-async-teardown-autogen.s390x-6.0.0.xml
create mode 100644 tests/qemuxml2xmloutdata/s390-no-async-teardown-autogen.s390x-latest.xml
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 8f77e8fc58..8ed3283546 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4081,6 +4081,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
bool addDefaultUSBMouse = false;
bool addPanicDevice = false;
bool addITCOWatchdog = false;
+ bool addAsyncTeardown = false;
/* add implicit input devices */
if (qemuDomainDefAddImplicitInputDevice(def) < 0)
@@ -4164,6 +4165,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
addDefaultUSB = false;
addPanicDevice = true;
addPCIRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_ZPCI);
+ addAsyncTeardown = virQEMUCapsGet(qemuCaps, QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN);
break;
case VIR_ARCH_SPARC:
@@ -4334,6 +4336,11 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
}
}
+ if (addAsyncTeardown &&
+ def->features[VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN] == VIR_TRISTATE_BOOL_ABSENT)
+ def->features[VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN] = VIR_TRISTATE_BOOL_YES;
+
+
if (qemuDomainDefAddDefaultAudioBackend(driver, def) < 0)
return -1;
@@ -6694,6 +6701,13 @@ qemuDomainDefFormatBufInternal(virQEMUDriver *driver,
}
}
}
+
+ /* Remove asynchronous teardown enablement for backwards compatibility
+ * on S390 as it gets autogenerated on S390 if supported anyway.
+ */
+ if (ARCH_IS_S390(def->os.arch) &&
+ def->features[VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN] != VIR_TRISTATE_BOOL_YES)
+ def->features[VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN] = VIR_TRISTATE_BOOL_ABSENT;
}
format:
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml
index 6e879ded86..368e3059c8 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio.xml
@@ -11,6 +11,7 @@
<features>
<apic/>
<pae/>
+ <async-teardown enabled='yes'/>
</features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml
index 9b16951e46..4d7132b012 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml
@@ -11,6 +11,7 @@
<features>
<apic/>
<pae/>
+ <async-teardown enabled='yes'/>
</features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml
index b5292a7ed2..8cb615e28a 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml
@@ -11,6 +11,7 @@
<features>
<apic/>
<pae/>
+ <async-teardown enabled='yes'/>
</features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml
index f37868101c..751bb86eba 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml
@@ -11,6 +11,7 @@
<features>
<apic/>
<pae/>
+ <async-teardown enabled='yes'/>
</features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml
index f37868101c..751bb86eba 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml
@@ -11,6 +11,7 @@
<features>
<apic/>
<pae/>
+ <async-teardown enabled='yes'/>
</features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml
index 42f89a07a2..6119894ce3 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml
@@ -11,6 +11,7 @@
<features>
<apic/>
<pae/>
+ <async-teardown enabled='yes'/>
</features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'/>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml
index f0570b5cf4..ffc85115a7 100644
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live.xml
@@ -11,6 +11,7 @@
<features>
<apic/>
<pae/>
+ <async-teardown enabled='yes'/>
</features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'/>
diff --git a/tests/qemuxml2argvdata/balloon-ccw-deflate.s390x-latest.args b/tests/qemuxml2argvdata/balloon-ccw-deflate.s390x-latest.args
index f615448649..67cf92ec40 100644
--- a/tests/qemuxml2argvdata/balloon-ccw-deflate.s390x-latest.args
+++ b/tests/qemuxml2argvdata/balloon-ccw-deflate.s390x-latest.args
@@ -29,4 +29,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","deflate-on-oom":true,"devno":"fe.0.000a"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/console-sclp.s390x-latest.args b/tests/qemuxml2argvdata/console-sclp.s390x-latest.args
index 42537cc233..d23ae37b16 100644
--- a/tests/qemuxml2argvdata/console-sclp.s390x-latest.args
+++ b/tests/qemuxml2argvdata/console-sclp.s390x-latest.args
@@ -34,4 +34,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/console-virtio-ccw.s390x-latest.args b/tests/qemuxml2argvdata/console-virtio-ccw.s390x-latest.args
index 928c03de5a..65fa4a0258 100644
--- a/tests/qemuxml2argvdata/console-virtio-ccw.s390x-latest.args
+++ b/tests/qemuxml2argvdata/console-virtio-ccw.s390x-latest.args
@@ -35,4 +35,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.000a"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/cpu-s390-features.s390x-latest.args b/tests/qemuxml2argvdata/cpu-s390-features.s390x-latest.args
index d6c1d6e278..4b14c3bc2b 100644
--- a/tests/qemuxml2argvdata/cpu-s390-features.s390x-latest.args
+++ b/tests/qemuxml2argvdata/cpu-s390-features.s390x-latest.args
@@ -28,4 +28,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest1/.config \
-boot strict=on \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/cpu-s390-zEC12.s390x-latest.args b/tests/qemuxml2argvdata/cpu-s390-zEC12.s390x-latest.args
index 8ad4fd90ce..0dd84544eb 100644
--- a/tests/qemuxml2argvdata/cpu-s390-zEC12.s390x-latest.args
+++ b/tests/qemuxml2argvdata/cpu-s390-zEC12.s390x-latest.args
@@ -28,4 +28,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest1/.config \
-boot strict=on \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/default-video-type-s390x.s390x-latest.args b/tests/qemuxml2argvdata/default-video-type-s390x.s390x-latest.args
index ad8bc8df0f..78f5de1e1d 100644
--- a/tests/qemuxml2argvdata/default-video-type-s390x.s390x-latest.args
+++ b/tests/qemuxml2argvdata/default-video-type-s390x.s390x-latest.args
@@ -29,4 +29,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-default-video-type-s/.config \
-vnc 127.0.0.1:0,audiodev=audio1 \
-device '{"driver":"virtio-gpu-ccw","id":"video0","max_outputs":1,"devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-latest.args b/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-latest.args
index dc86dd162e..9c7dcbb1ad 100644
--- a/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-latest.args
+++ b/tests/qemuxml2argvdata/disk-error-policy-s390x.s390x-latest.args
@@ -37,4 +37,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-device '{"driver":"virtio-blk-ccw","devno":"fe.0.0002","drive":"libvirt-1-format","id":"virtio-disk2","write-cache":"on","werror":"report","rerror":"ignore"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-virtio-ccw-many.s390x-latest.args b/tests/qemuxml2argvdata/disk-virtio-ccw-many.s390x-latest.args
index 584f1ac203..ba5b002b17 100644
--- a/tests/qemuxml2argvdata/disk-virtio-ccw-many.s390x-latest.args
+++ b/tests/qemuxml2argvdata/disk-virtio-ccw-many.s390x-latest.args
@@ -41,4 +41,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.000a"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-virtio-ccw.s390x-latest.args b/tests/qemuxml2argvdata/disk-virtio-ccw.s390x-latest.args
index 251d1ca919..3a078e0672 100644
--- a/tests/qemuxml2argvdata/disk-virtio-ccw.s390x-latest.args
+++ b/tests/qemuxml2argvdata/disk-virtio-ccw.s390x-latest.args
@@ -35,4 +35,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.000a"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-virtio-s390-zpci.s390x-latest.args b/tests/qemuxml2argvdata/disk-virtio-s390-zpci.s390x-latest.args
index 667be38d02..dbd3f78699 100644
--- a/tests/qemuxml2argvdata/disk-virtio-s390-zpci.s390x-latest.args
+++ b/tests/qemuxml2argvdata/disk-virtio-s390-zpci.s390x-latest.args
@@ -33,4 +33,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/fs9p-ccw.s390x-latest.args b/tests/qemuxml2argvdata/fs9p-ccw.s390x-latest.args
index a10b7bf3b6..3225c8bb7e 100644
--- a/tests/qemuxml2argvdata/fs9p-ccw.s390x-latest.args
+++ b/tests/qemuxml2argvdata/fs9p-ccw.s390x-latest.args
@@ -38,4 +38,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0004"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-ccw.s390x-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-ccw.s390x-latest.args
index 3b327ee0b9..3d6c343878 100644
--- a/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-ccw.s390x-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-ccw.s390x-latest.args
@@ -34,4 +34,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.config \
-device '{"driver":"vhost-scsi-ccw","wwpn":"naa.5123456789abcde0","vhostfd":"3","id":"hostdev0","devno":"fe.0.0002"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0003"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ap.s390x-latest.args b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ap.s390x-latest.args
index 9a531f864a..2842c63ade 100644
--- a/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ap.s390x-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ap.s390x-latest.args
@@ -30,4 +30,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"vfio-ap","id":"hostdev0","sysfsdev":"/sys/bus/mdev/devices/90c6c135-ad44-41d0-b1b7-bae47de48627"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.args b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.args
index 35ca1f8e80..15cb11c2b1 100644
--- a/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.args
@@ -30,4 +30,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"vfio-ccw","id":"hostdev0","sysfsdev":"/sys/bus/mdev/devices/90c6c135-ad44-41d0-b1b7-bae47de48627","bootindex":1,"devno":"fe.0.0000"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.s390x-latest.args b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.s390x-latest.args
index 80d2aa6955..f53f2ad91f 100644
--- a/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.s390x-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.s390x-latest.args
@@ -30,4 +30,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"vfio-ccw","id":"hostdev0","sysfsdev":"/sys/bus/mdev/devices/90c6c135-ad44-41d0-b1b7-bae47de48627","devno":"fe.0.0000"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-fids.s390x-latest.args b/tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-fids.s390x-latest.args
index 3261839623..0135d88288 100644
--- a/tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-fids.s390x-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-fids.s390x-latest.args
@@ -33,4 +33,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"vfio-pci","host":"0001:00:00.0","id":"hostdev1","bus":"pci.0","addr":"0x2"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-uids.s390x-latest.args b/tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-uids.s390x-latest.args
index ea30b77795..e94e64f3a9 100644
--- a/tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-uids.s390x-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-uids.s390x-latest.args
@@ -33,4 +33,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"vfio-pci","host":"0000:00:01.0","id":"hostdev1","bus":"pci.0","addr":"0x2"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate.s390x-latest.args b/tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate.s390x-latest.args
index f9b31cb30c..0caa5bef49 100644
--- a/tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate.s390x-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"vfio-pci","host":"0000:00:00.0","id":"hostdev0","bus":"pci.0","addr":"0x1"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/hostdev-vfio-zpci-boundaries.s390x-latest.args b/tests/qemuxml2argvdata/hostdev-vfio-zpci-boundaries.s390x-latest.args
index 68728dd663..0f550fd5c1 100644
--- a/tests/qemuxml2argvdata/hostdev-vfio-zpci-boundaries.s390x-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-vfio-zpci-boundaries.s390x-latest.args
@@ -35,4 +35,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"vfio-pci","host":"0000:00:00.0","id":"hostdev1","bus":"pci.0","addr":"0x2"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/hostdev-vfio-zpci-ccw-memballoon.s390x-latest.args b/tests/qemuxml2argvdata/hostdev-vfio-zpci-ccw-memballoon.s390x-latest.args
index 760edbc759..76bdf01693 100644
--- a/tests/qemuxml2argvdata/hostdev-vfio-zpci-ccw-memballoon.s390x-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-vfio-zpci-ccw-memballoon.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-KVMGuest1/.config \
-device '{"driver":"vfio-pci","host":"0000:00:00.0","id":"hostdev0","bus":"pci.0","addr":"0x1"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.s390x-latest.args b/tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.s390x-latest.args
index 10810b3434..38f473887e 100644
--- a/tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.s390x-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.s390x-latest.args
@@ -45,4 +45,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"vfio-pci","host":"0008:00:00.0","id":"hostdev7","bus":"pci.0","addr":"0x6"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/hostdev-vfio-zpci.s390x-latest.args b/tests/qemuxml2argvdata/hostdev-vfio-zpci.s390x-latest.args
index da161e0153..2f15edc464 100644
--- a/tests/qemuxml2argvdata/hostdev-vfio-zpci.s390x-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-vfio-zpci.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"vfio-pci","host":"0000:00:00.0","id":"hostdev0","bus":"pci.0","addr":"0x8"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/input-virtio-ccw.s390x-latest.args b/tests/qemuxml2argvdata/input-virtio-ccw.s390x-latest.args
index 6fcd1eb05d..9e513ae5d0 100644
--- a/tests/qemuxml2argvdata/input-virtio-ccw.s390x-latest.args
+++ b/tests/qemuxml2argvdata/input-virtio-ccw.s390x-latest.args
@@ -35,4 +35,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/iothreads-virtio-scsi-ccw.s390x-latest.args b/tests/qemuxml2argvdata/iothreads-virtio-scsi-ccw.s390x-latest.args
index e4c045d739..713131e5eb 100644
--- a/tests/qemuxml2argvdata/iothreads-virtio-scsi-ccw.s390x-latest.args
+++ b/tests/qemuxml2argvdata/iothreads-virtio-scsi-ccw.s390x-latest.args
@@ -38,4 +38,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.000a"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/launch-security-s390-pv.s390x-latest.args b/tests/qemuxml2argvdata/launch-security-s390-pv.s390x-latest.args
index 50feb53e3c..a4ceede21a 100644
--- a/tests/qemuxml2argvdata/launch-security-s390-pv.s390x-latest.args
+++ b/tests/qemuxml2argvdata/launch-security-s390-pv.s390x-latest.args
@@ -33,4 +33,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-object '{"qom-type":"s390-pv-guest","id":"lsec0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-aeskeywrap-off-cap.s390x-latest.args b/tests/qemuxml2argvdata/machine-aeskeywrap-off-cap.s390x-latest.args
index b6edb35107..c679ad3d95 100644
--- a/tests/qemuxml2argvdata/machine-aeskeywrap-off-cap.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-aeskeywrap-off-cap.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-blk-ccw","devno":"fe.0.0000","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-aeskeywrap-off-caps.s390x-latest.args b/tests/qemuxml2argvdata/machine-aeskeywrap-off-caps.s390x-latest.args
index b6edb35107..c679ad3d95 100644
--- a/tests/qemuxml2argvdata/machine-aeskeywrap-off-caps.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-aeskeywrap-off-caps.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-blk-ccw","devno":"fe.0.0000","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-aeskeywrap-on-cap.s390x-latest.args b/tests/qemuxml2argvdata/machine-aeskeywrap-on-cap.s390x-latest.args
index 74c52f9094..8ded2fb6a3 100644
--- a/tests/qemuxml2argvdata/machine-aeskeywrap-on-cap.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-aeskeywrap-on-cap.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-blk-ccw","devno":"fe.0.0000","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-aeskeywrap-on-caps.s390x-latest.args b/tests/qemuxml2argvdata/machine-aeskeywrap-on-caps.s390x-latest.args
index 74c52f9094..8ded2fb6a3 100644
--- a/tests/qemuxml2argvdata/machine-aeskeywrap-on-caps.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-aeskeywrap-on-caps.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-blk-ccw","devno":"fe.0.0000","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-deakeywrap-off-cap.s390x-latest.args b/tests/qemuxml2argvdata/machine-deakeywrap-off-cap.s390x-latest.args
index 29f3330c1c..bc2d594832 100644
--- a/tests/qemuxml2argvdata/machine-deakeywrap-off-cap.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-deakeywrap-off-cap.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-blk-ccw","devno":"fe.0.0000","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-deakeywrap-off-caps.s390x-latest.args b/tests/qemuxml2argvdata/machine-deakeywrap-off-caps.s390x-latest.args
index 29f3330c1c..bc2d594832 100644
--- a/tests/qemuxml2argvdata/machine-deakeywrap-off-caps.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-deakeywrap-off-caps.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-blk-ccw","devno":"fe.0.0000","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-deakeywrap-on-cap.s390x-latest.args b/tests/qemuxml2argvdata/machine-deakeywrap-on-cap.s390x-latest.args
index 1ed36c684b..5a710bfc07 100644
--- a/tests/qemuxml2argvdata/machine-deakeywrap-on-cap.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-deakeywrap-on-cap.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-blk-ccw","devno":"fe.0.0000","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-deakeywrap-on-caps.s390x-latest.args b/tests/qemuxml2argvdata/machine-deakeywrap-on-caps.s390x-latest.args
index 1ed36c684b..5a710bfc07 100644
--- a/tests/qemuxml2argvdata/machine-deakeywrap-on-caps.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-deakeywrap-on-caps.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-blk-ccw","devno":"fe.0.0000","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-keywrap-none-caps.s390x-latest.args b/tests/qemuxml2argvdata/machine-keywrap-none-caps.s390x-latest.args
index 809b4e8acf..ad6485c2df 100644
--- a/tests/qemuxml2argvdata/machine-keywrap-none-caps.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-keywrap-none-caps.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-blk-ccw","devno":"fe.0.0000","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-keywrap-none.s390x-latest.args b/tests/qemuxml2argvdata/machine-keywrap-none.s390x-latest.args
index 809b4e8acf..ad6485c2df 100644
--- a/tests/qemuxml2argvdata/machine-keywrap-none.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-keywrap-none.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-blk-ccw","devno":"fe.0.0000","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-loadparm-hostdev.s390x-latest.args b/tests/qemuxml2argvdata/machine-loadparm-hostdev.s390x-latest.args
index 41deb43f37..0797cc4539 100644
--- a/tests/qemuxml2argvdata/machine-loadparm-hostdev.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-loadparm-hostdev.s390x-latest.args
@@ -30,4 +30,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"vfio-ccw","id":"hostdev0","sysfsdev":"/sys/bus/mdev/devices/90c6c135-ad44-41d0-b1b7-bae47de48627","bootindex":1,"devno":"fe.0.0000"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-loadparm-multiple-disks-nets-s390.s390x-latest.args b/tests/qemuxml2argvdata/machine-loadparm-multiple-disks-nets-s390.s390x-latest.args
index d5c5a334be..63a6116d99 100644
--- a/tests/qemuxml2argvdata/machine-loadparm-multiple-disks-nets-s390.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-loadparm-multiple-disks-nets-s390.s390x-latest.args
@@ -39,4 +39,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-loadparm-net-s390.s390x-latest.args b/tests/qemuxml2argvdata/machine-loadparm-net-s390.s390x-latest.args
index 114d38cddc..c0fc8ff164 100644
--- a/tests/qemuxml2argvdata/machine-loadparm-net-s390.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-loadparm-net-s390.s390x-latest.args
@@ -31,4 +31,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-loadparm-s390.s390x-latest.args b/tests/qemuxml2argvdata/machine-loadparm-s390.s390x-latest.args
index c8f0273ea8..fccc9b5c52 100644
--- a/tests/qemuxml2argvdata/machine-loadparm-s390.s390x-latest.args
+++ b/tests/qemuxml2argvdata/machine-loadparm-s390.s390x-latest.args
@@ -32,4 +32,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/net-virtio-ccw.s390x-latest.args b/tests/qemuxml2argvdata/net-virtio-ccw.s390x-latest.args
index f7203db196..e03eb88087 100644
--- a/tests/qemuxml2argvdata/net-virtio-ccw.s390x-latest.args
+++ b/tests/qemuxml2argvdata/net-virtio-ccw.s390x-latest.args
@@ -33,4 +33,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.000a"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/s390-allow-bogus-usb-controller.s390x-latest.args b/tests/qemuxml2argvdata/s390-allow-bogus-usb-controller.s390x-latest.args
index 8b11cff2f5..05cb9ca393 100644
--- a/tests/qemuxml2argvdata/s390-allow-bogus-usb-controller.s390x-latest.args
+++ b/tests/qemuxml2argvdata/s390-allow-bogus-usb-controller.s390x-latest.args
@@ -37,4 +37,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/hwrng"}' \
-device '{"driver":"virtio-rng-ccw","rng":"objrng0","id":"rng0","devno":"fe.0.0003"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/s390-allow-bogus-usb-none.s390x-latest.args b/tests/qemuxml2argvdata/s390-allow-bogus-usb-none.s390x-latest.args
index 8b11cff2f5..05cb9ca393 100644
--- a/tests/qemuxml2argvdata/s390-allow-bogus-usb-none.s390x-latest.args
+++ b/tests/qemuxml2argvdata/s390-allow-bogus-usb-none.s390x-latest.args
@@ -37,4 +37,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/hwrng"}' \
-device '{"driver":"virtio-rng-ccw","rng":"objrng0","id":"rng0","devno":"fe.0.0003"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
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 561c69dc76..3ead99554b 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
@@ -29,4 +29,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
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 ec143a63a1..902e3ce8af 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
@@ -29,4 +29,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.args b/tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.args
index 452d78c120..3035b979cd 100644
--- a/tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.args
+++ b/tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.args
@@ -29,4 +29,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.args b/tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.args
index b132972521..b6301123ad 100644
--- a/tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.args
+++ b/tests/qemuxml2argvdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.args
@@ -29,4 +29,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/s390-no-async-teardown-autogen.s390x-6.0.0.args b/tests/qemuxml2argvdata/s390-no-async-teardown-autogen.s390x-6.0.0.args
new file mode 100644
index 0000000000..d072c50eae
--- /dev/null
+++ b/tests/qemuxml2argvdata/s390-no-async-teardown-autogen.s390x-6.0.0.args
@@ -0,0 +1,32 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
+/usr/bin/qemu-system-s390x \
+-name guest=test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \
+-machine s390-ccw-virtio-6.0,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}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 9aa4b45c-b9dd-45ef-91fe-862b27b4231f \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0000 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/s390-no-async-teardown-autogen.s390x-latest.args b/tests/qemuxml2argvdata/s390-no-async-teardown-autogen.s390x-latest.args
new file mode 100644
index 0000000000..606997374b
--- /dev/null
+++ b/tests/qemuxml2argvdata/s390-no-async-teardown-autogen.s390x-latest.args
@@ -0,0 +1,33 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
+/usr/bin/qemu-system-s390x \
+-name guest=test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \
+-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \
+-accel kvm \
+-cpu gen16a-base,nnpa=on,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,pai=on,paie=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,rdp=on,sea_esop2=on,beareh=on,te=on,cmm=on,vxpdeh2=on \
+-m 256 \
+-object '{"qom-type":"memory-backend-ram","id":"s390.ram","size":268435456}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 9aa4b45c-b9dd-45ef-91fe-862b27b4231f \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0000"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/s390-no-async-teardown-autogen.xml b/tests/qemuxml2argvdata/s390-no-async-teardown-autogen.xml
new file mode 100644
index 0000000000..e8e76cb372
--- /dev/null
+++ b/tests/qemuxml2argvdata/s390-no-async-teardown-autogen.xml
@@ -0,0 +1,18 @@
+<domain type='kvm'>
+ <name>test</name>
+ <uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
+ <memory unit='KiB'>262144</memory>
+ <currentMemory unit='KiB'>262144</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/s390-panic-missing.s390x-latest.args b/tests/qemuxml2argvdata/s390-panic-missing.s390x-latest.args
index dd8d1a99a6..63d4d68d1d 100644
--- a/tests/qemuxml2argvdata/s390-panic-missing.s390x-latest.args
+++ b/tests/qemuxml2argvdata/s390-panic-missing.s390x-latest.args
@@ -32,4 +32,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0002"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/s390-panic-no-address.s390x-latest.args b/tests/qemuxml2argvdata/s390-panic-no-address.s390x-latest.args
index 978d4c4279..23d8e30f71 100644
--- a/tests/qemuxml2argvdata/s390-panic-no-address.s390x-latest.args
+++ b/tests/qemuxml2argvdata/s390-panic-no-address.s390x-latest.args
@@ -32,4 +32,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/s390-serial-2.s390x-latest.args b/tests/qemuxml2argvdata/s390-serial-2.s390x-latest.args
index 75006f4c34..6834852bb6 100644
--- a/tests/qemuxml2argvdata/s390-serial-2.s390x-latest.args
+++ b/tests/qemuxml2argvdata/s390-serial-2.s390x-latest.args
@@ -32,4 +32,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"sclplmconsole","chardev":"charserial1","id":"serial1"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/s390-serial-console.s390x-latest.args b/tests/qemuxml2argvdata/s390-serial-console.s390x-latest.args
index 50c5826d42..5b725360ac 100644
--- a/tests/qemuxml2argvdata/s390-serial-console.s390x-latest.args
+++ b/tests/qemuxml2argvdata/s390-serial-console.s390x-latest.args
@@ -30,4 +30,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"sclpconsole","chardev":"charserial0","id":"serial0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/s390-serial.s390x-latest.args b/tests/qemuxml2argvdata/s390-serial.s390x-latest.args
index 50c5826d42..5b725360ac 100644
--- a/tests/qemuxml2argvdata/s390-serial.s390x-latest.args
+++ b/tests/qemuxml2argvdata/s390-serial.s390x-latest.args
@@ -30,4 +30,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"sclpconsole","chardev":"charserial0","id":"serial0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/s390x-ccw-graphics.s390x-latest.args b/tests/qemuxml2argvdata/s390x-ccw-graphics.s390x-latest.args
index 63a46c48a9..e1b1cc278f 100644
--- a/tests/qemuxml2argvdata/s390x-ccw-graphics.s390x-latest.args
+++ b/tests/qemuxml2argvdata/s390x-ccw-graphics.s390x-latest.args
@@ -44,4 +44,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \
-device '{"driver":"virtio-rng-ccw","rng":"objrng0","id":"rng0","devno":"fe.0.0007"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/s390x-ccw-headless.s390x-latest.args b/tests/qemuxml2argvdata/s390x-ccw-headless.s390x-latest.args
index 57d6af3913..ce440e9fb1 100644
--- a/tests/qemuxml2argvdata/s390x-ccw-headless.s390x-latest.args
+++ b/tests/qemuxml2argvdata/s390x-ccw-headless.s390x-latest.args
@@ -41,4 +41,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \
-device '{"driver":"virtio-rng-ccw","rng":"objrng0","id":"rng0","devno":"fe.0.0004"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/vhost-vsock-ccw-auto.s390x-latest.args b/tests/qemuxml2argvdata/vhost-vsock-ccw-auto.s390x-latest.args
index d73d813f38..e90e0d7d70 100644
--- a/tests/qemuxml2argvdata/vhost-vsock-ccw-auto.s390x-latest.args
+++ b/tests/qemuxml2argvdata/vhost-vsock-ccw-auto.s390x-latest.args
@@ -33,4 +33,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-device '{"driver":"vhost-vsock-ccw","id":"vsock0","guest-cid":42,"vhostfd":"6789","devno":"fe.0.0002"}' \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/vhost-vsock-ccw-iommu.s390x-latest.args b/tests/qemuxml2argvdata/vhost-vsock-ccw-iommu.s390x-latest.args
index a3f7a7eedf..d17edb7d33 100644
--- a/tests/qemuxml2argvdata/vhost-vsock-ccw-iommu.s390x-latest.args
+++ b/tests/qemuxml2argvdata/vhost-vsock-ccw-iommu.s390x-latest.args
@@ -33,4 +33,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-device '{"driver":"vhost-vsock-ccw","iommu_platform":true,"id":"vsock0","guest-cid":4,"vhostfd":"6789","devno":"fe.0.0002"}' \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/vhost-vsock-ccw-iommu.xml b/tests/qemuxml2argvdata/vhost-vsock-ccw-iommu.xml
index cc299dcba9..968442c707 100644
--- a/tests/qemuxml2argvdata/vhost-vsock-ccw-iommu.xml
+++ b/tests/qemuxml2argvdata/vhost-vsock-ccw-iommu.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2argvdata/vhost-vsock-ccw.s390x-latest.args b/tests/qemuxml2argvdata/vhost-vsock-ccw.s390x-latest.args
index ac2d3dc255..a9b4a48e81 100644
--- a/tests/qemuxml2argvdata/vhost-vsock-ccw.s390x-latest.args
+++ b/tests/qemuxml2argvdata/vhost-vsock-ccw.s390x-latest.args
@@ -33,4 +33,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-device '{"driver":"vhost-vsock-ccw","id":"vsock0","guest-cid":4,"vhostfd":"6789","devno":"fe.0.0003"}' \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/video-virtio-gpu-ccw.s390x-latest.args b/tests/qemuxml2argvdata/video-virtio-gpu-ccw.s390x-latest.args
index d9f2f08d98..c405db6eca 100644
--- a/tests/qemuxml2argvdata/video-virtio-gpu-ccw.s390x-latest.args
+++ b/tests/qemuxml2argvdata/video-virtio-gpu-ccw.s390x-latest.args
@@ -34,4 +34,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-device '{"driver":"virtio-gpu-ccw","id":"video1","max_outputs":1,"devno":"fe.0.0003"}' \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/virtio-rng-ccw.s390x-latest.args b/tests/qemuxml2argvdata/virtio-rng-ccw.s390x-latest.args
index 2ba8382bbf..7b58eb3f7c 100644
--- a/tests/qemuxml2argvdata/virtio-rng-ccw.s390x-latest.args
+++ b/tests/qemuxml2argvdata/virtio-rng-ccw.s390x-latest.args
@@ -37,4 +37,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/hwrng"}' \
-device '{"driver":"virtio-rng-ccw","rng":"objrng0","id":"rng0","devno":"fe.0.0002"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/watchdog-diag288.s390x-latest.args b/tests/qemuxml2argvdata/watchdog-diag288.s390x-latest.args
index 326a3c3d27..e46e645559 100644
--- a/tests/qemuxml2argvdata/watchdog-diag288.s390x-latest.args
+++ b/tests/qemuxml2argvdata/watchdog-diag288.s390x-latest.args
@@ -34,4 +34,5 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-watchdog-action inject-nmi \
-device '{"driver":"virtio-balloon-ccw","id":"balloon0","devno":"fe.0.0001"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-run-with async-teardown=on \
-msg timestamp=on
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 077003f88c..b709becf52 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2705,6 +2705,8 @@ mymain(void)
DO_TEST_CAPS_ARCH_VER_PARSE_ERROR("s390-async-teardown", "s390x", "6.0.0");
DO_TEST_CAPS_ARCH_LATEST("s390-async-teardown-disabled", "s390x");
DO_TEST_CAPS_ARCH_VER("s390-async-teardown-disabled", "s390x", "6.0.0");
+ DO_TEST_CAPS_ARCH_LATEST("s390-no-async-teardown-autogen", "s390x");
+ DO_TEST_CAPS_ARCH_VER("s390-no-async-teardown-autogen", "s390x", "6.0.0");
qemuTestDriverFree(&driver);
virFileWrapperClearPrefixes();
diff --git a/tests/qemuxml2xmloutdata/default-video-type-s390x.s390x-latest.xml b/tests/qemuxml2xmloutdata/default-video-type-s390x.s390x-latest.xml
index c8aac8f1bf..6a6b9d2a2b 100644
--- a/tests/qemuxml2xmloutdata/default-video-type-s390x.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/default-video-type-s390x.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
diff --git a/tests/qemuxml2xmloutdata/disk-virtio-s390-zpci.s390x-latest.xml b/tests/qemuxml2xmloutdata/disk-virtio-s390-zpci.s390x-latest.xml
index c98bf78160..c7aa466579 100644
--- a/tests/qemuxml2xmloutdata/disk-virtio-s390-zpci.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/disk-virtio-s390-zpci.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-ccw.s390x-latest.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-ccw.s390x-latest.xml
index efd3027d3e..e5f58ede0d 100644
--- a/tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-ccw.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-ccw.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ap.s390x-latest.xml b/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ap.s390x-latest.xml
index 96cd88bfdd..0cee4da951 100644
--- a/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ap.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ap.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.xml b/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.xml
index f2ae0b7d09..4827b6e2a6 100644
--- a/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ccw-boot.s390x-latest.xml
@@ -7,6 +7,9 @@
<os>
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ccw.s390x-latest.xml b/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ccw.s390x-latest.xml
index b411a2a348..e4526d8bce 100644
--- a/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ccw.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ccw.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-autogenerate-fids.s390x-latest.xml b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-autogenerate-fids.s390x-latest.xml
index dd1dea4e99..902d2227ee 100644
--- a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-autogenerate-fids.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-autogenerate-fids.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-autogenerate-uids.s390x-latest.xml b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-autogenerate-uids.s390x-latest.xml
index 1a52487692..136e56dedc 100644
--- a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-autogenerate-uids.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-autogenerate-uids.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-autogenerate.s390x-latest.xml b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-autogenerate.s390x-latest.xml
index 670f8c68b4..3c93c5e868 100644
--- a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-autogenerate.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-autogenerate.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-boundaries.s390x-latest.xml b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-boundaries.s390x-latest.xml
index df55f79501..a868c7d585 100644
--- a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-boundaries.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-boundaries.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-ccw-memballoon.s390x-latest.xml b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-ccw-memballoon.s390x-latest.xml
index 7df6491b68..2b97ebb30e 100644
--- a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-ccw-memballoon.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-ccw-memballoon.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
diff --git a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-multidomain-many.s390x-latest.xml b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-multidomain-many.s390x-latest.xml
index e64d7de561..937ed64ecc 100644
--- a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-multidomain-many.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-multidomain-many.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci.s390x-latest.xml b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci.s390x-latest.xml
index 5e14a63810..266f8cf1af 100644
--- a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/input-virtio-ccw.s390x-latest.xml b/tests/qemuxml2xmloutdata/input-virtio-ccw.s390x-latest.xml
index bca07c8fd8..2b95beb0bd 100644
--- a/tests/qemuxml2xmloutdata/input-virtio-ccw.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/input-virtio-ccw.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/iothreads-disk-virtio-ccw.s390x-latest.xml b/tests/qemuxml2xmloutdata/iothreads-disk-virtio-ccw.s390x-latest.xml
index cdcee3bbb4..45d7238ded 100644
--- a/tests/qemuxml2xmloutdata/iothreads-disk-virtio-ccw.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/iothreads-disk-virtio-ccw.s390x-latest.xml
@@ -9,6 +9,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/iothreads-virtio-scsi-ccw.s390x-latest.xml b/tests/qemuxml2xmloutdata/iothreads-virtio-scsi-ccw.s390x-latest.xml
index d73f43f235..19e8d1246b 100644
--- a/tests/qemuxml2xmloutdata/iothreads-virtio-scsi-ccw.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/iothreads-virtio-scsi-ccw.s390x-latest.xml
@@ -9,6 +9,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/machine-loadparm-hostdev.s390x-latest.xml b/tests/qemuxml2xmloutdata/machine-loadparm-hostdev.s390x-latest.xml
index f564d6deb0..47a45e72d4 100644
--- a/tests/qemuxml2xmloutdata/machine-loadparm-hostdev.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/machine-loadparm-hostdev.s390x-latest.xml
@@ -7,6 +7,9 @@
<os>
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/machine-loadparm-multiple-disks-nets-s390.s390x-latest.xml b/tests/qemuxml2xmloutdata/machine-loadparm-multiple-disks-nets-s390.s390x-latest.xml
index 039968d7e4..8c06ab3fa5 100644
--- a/tests/qemuxml2xmloutdata/machine-loadparm-multiple-disks-nets-s390.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/machine-loadparm-multiple-disks-nets-s390.s390x-latest.xml
@@ -7,6 +7,9 @@
<os>
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.xml
index ae39e6277d..75c4c79c32 100644
--- a/tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-2.7.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio-2.7'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='host-passthrough' check='none'/>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
diff --git a/tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.xml
index 4906206ada..0acc8d5abd 100644
--- a/tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390-default-cpu-kvm-ccw-virtio-4.2.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio-4.2'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
diff --git a/tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.xml
index f4f9e724a9..704e06a4c4 100644
--- a/tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-2.7.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio-2.7'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.xml
index 65dd30a3fb..4a2d567641 100644
--- a/tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390-default-cpu-tcg-ccw-virtio-4.2.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio-4.2'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/s390-defaultconsole.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390-defaultconsole.s390x-latest.xml
index 212b294291..ab84711155 100644
--- a/tests/qemuxml2xmloutdata/s390-defaultconsole.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390-defaultconsole.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
diff --git a/tests/qemuxml2xmloutdata/s390-no-async-teardown-autogen.s390x-6.0.0.xml b/tests/qemuxml2xmloutdata/s390-no-async-teardown-autogen.s390x-6.0.0.xml
new file mode 100644
index 0000000000..8fc0c6fe8f
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/s390-no-async-teardown-autogen.s390x-6.0.0.xml
@@ -0,0 +1,25 @@
+<domain type='kvm'>
+ <name>test</name>
+ <uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
+ <memory unit='KiB'>262144</memory>
+ <currentMemory unit='KiB'>262144</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='s390x' machine='s390-ccw-virtio-6.0'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <cpu mode='host-model' check='partial'/>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
+ <controller type='pci' index='0' model='pci-root'/>
+ <audio id='1' type='none'/>
+ <memballoon model='virtio'>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
+ </memballoon>
+ <panic model='s390'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmloutdata/s390-no-async-teardown-autogen.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390-no-async-teardown-autogen.s390x-latest.xml
new file mode 100644
index 0000000000..4f79e2e4f4
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/s390-no-async-teardown-autogen.s390x-latest.xml
@@ -0,0 +1,28 @@
+<domain type='kvm'>
+ <name>test</name>
+ <uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
+ <memory unit='KiB'>262144</memory>
+ <currentMemory unit='KiB'>262144</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
+ <cpu mode='host-model' check='partial'/>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
+ <controller type='pci' index='0' model='pci-root'/>
+ <audio id='1' type='none'/>
+ <memballoon model='virtio'>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
+ </memballoon>
+ <panic model='s390'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmloutdata/s390-panic-missing.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390-panic-missing.s390x-latest.xml
index b36c12e435..a7dec81555 100644
--- a/tests/qemuxml2xmloutdata/s390-panic-missing.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390-panic-missing.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/s390-panic-no-address.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390-panic-no-address.s390x-latest.xml
index 9b9fbf3243..510396a9a8 100644
--- a/tests/qemuxml2xmloutdata/s390-panic-no-address.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390-panic-no-address.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/s390-panic.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390-panic.s390x-latest.xml
index 2f27890ceb..1374d966fc 100644
--- a/tests/qemuxml2xmloutdata/s390-panic.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390-panic.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='host-model' check='partial'/>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
diff --git a/tests/qemuxml2xmloutdata/s390-serial-2.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390-serial-2.s390x-latest.xml
index bf67ed8c12..db1d4e32c9 100644
--- a/tests/qemuxml2xmloutdata/s390-serial-2.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390-serial-2.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/s390-serial-console.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390-serial-console.s390x-latest.xml
index 9ce55598bc..36c4b85dc7 100644
--- a/tests/qemuxml2xmloutdata/s390-serial-console.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390-serial-console.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/s390-serial.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390-serial.s390x-latest.xml
index 9ce55598bc..36c4b85dc7 100644
--- a/tests/qemuxml2xmloutdata/s390-serial.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390-serial.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/s390x-ccw-graphics.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390x-ccw-graphics.s390x-latest.xml
index c4c4c4cfdb..375f293855 100644
--- a/tests/qemuxml2xmloutdata/s390x-ccw-graphics.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390x-ccw-graphics.s390x-latest.xml
@@ -13,6 +13,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/s390x-ccw-headless.s390x-latest.xml b/tests/qemuxml2xmloutdata/s390x-ccw-headless.s390x-latest.xml
index 48d9cb86f2..3b092cb574 100644
--- a/tests/qemuxml2xmloutdata/s390x-ccw-headless.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/s390x-ccw-headless.s390x-latest.xml
@@ -13,6 +13,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/vhost-vsock-ccw-auto.s390x-latest.xml b/tests/qemuxml2xmloutdata/vhost-vsock-ccw-auto.s390x-latest.xml
index c384522a42..30ca0c7caf 100644
--- a/tests/qemuxml2xmloutdata/vhost-vsock-ccw-auto.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/vhost-vsock-ccw-auto.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/vhost-vsock-ccw.s390x-latest.xml b/tests/qemuxml2xmloutdata/vhost-vsock-ccw.s390x-latest.xml
index d519028396..31a29da0e6 100644
--- a/tests/qemuxml2xmloutdata/vhost-vsock-ccw.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/vhost-vsock-ccw.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.s390x-latest.xml b/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.s390x-latest.xml
index 87ee9eee54..a2227a3eff 100644
--- a/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.s390x-latest.xml b/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.s390x-latest.xml
index 9b6bf6c980..d469060008 100644
--- a/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.s390x-latest.xml
+++ b/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.s390x-latest.xml
@@ -8,6 +8,9 @@
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
<boot dev='hd'/>
</os>
+ <features>
+ <async-teardown enabled='yes'/>
+ </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu</model>
</cpu>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 947ceac534..7fa348aa49 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -1244,6 +1244,8 @@ mymain(void)
DO_TEST_CAPS_ARCH_LATEST("s390-async-teardown-no-attrib", "s390x");
DO_TEST_CAPS_ARCH_LATEST("s390-async-teardown-disabled", "s390x");
DO_TEST_CAPS_ARCH_VER("s390-async-teardown-disabled", "s390x", "6.0.0");
+ DO_TEST_CAPS_ARCH_LATEST("s390-no-async-teardown-autogen", "s390x");
+ DO_TEST_CAPS_ARCH_VER("s390-no-async-teardown-autogen", "s390x", "6.0.0");
cleanup:
qemuTestDriverFree(&driver);
--
2.41.0
On 6/27/23 10:51 AM, Boris Fiuczynski wrote: > Enablement of asynchronous teardown on S390 and add tests for > asynchronous teardown autogeneration support. I don't know all of the implications of enabling vs not enabling this feature. It sounds like it speeds up shutdown significantly in some situations. But at minimum I would expect that the commit log would have a thorough justification for why the default behavior for s390 will change to use this new approach. Why does s390 require this feature to be the default and not any other architecture? The qemu commit log for this feature indicates that it was intended to speed up shutdown and cleanup of huge vms, and particularly protected vms. It mentioned that this is often the case on s390x, but is CPU architecture really the best deciding factor for enabling this feature? Any existing s390 domain that was defined on a previous version of libvirt will automatically change to async-teardown after upgrading libvirt. That seems potentially risky. What are the potential downsides? > > Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com> > --- [snip] > diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c > index 8f77e8fc58..8ed3283546 100644 > --- a/src/qemu/qemu_domain.c > +++ b/src/qemu/qemu_domain.c > @@ -4081,6 +4081,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, > bool addDefaultUSBMouse = false; > bool addPanicDevice = false; > bool addITCOWatchdog = false; > + bool addAsyncTeardown = false; > > /* add implicit input devices */ > if (qemuDomainDefAddImplicitInputDevice(def) < 0) > @@ -4164,6 +4165,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, > addDefaultUSB = false; > addPanicDevice = true; > addPCIRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_ZPCI); > + addAsyncTeardown = virQEMUCapsGet(qemuCaps, QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN); > break; > > case VIR_ARCH_SPARC: > @@ -4334,6 +4336,11 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, > } > } > > + if (addAsyncTeardown && > + def->features[VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN] == VIR_TRISTATE_BOOL_ABSENT) > + def->features[VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN] = VIR_TRISTATE_BOOL_YES; > + > + Wouldn't qemuDomainDefEnableDefaultFeatures() be a better location to put this? > if (qemuDomainDefAddDefaultAudioBackend(driver, def) < 0) > return -1; > > @@ -6694,6 +6701,13 @@ qemuDomainDefFormatBufInternal(virQEMUDriver *driver, > } > } > } > + > + /* Remove asynchronous teardown enablement for backwards compatibility > + * on S390 as it gets autogenerated on S390 if supported anyway. > + */ > + if (ARCH_IS_S390(def->os.arch) && > + def->features[VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN] != VIR_TRISTATE_BOOL_YES) > + def->features[VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN] = VIR_TRISTATE_BOOL_ABSENT; > } > Jonathon
On 6/28/23 10:26 PM, Jonathon Jongsma wrote:
> On 6/27/23 10:51 AM, Boris Fiuczynski wrote:
>> Enablement of asynchronous teardown on S390 and add tests for
>> asynchronous teardown autogeneration support.
>
> I don't know all of the implications of enabling vs not enabling this
> feature. It sounds like it speeds up shutdown significantly in some
> situations. But at minimum I would expect that the commit log would have
> a thorough justification for why the default behavior for s390 will
> change to use this new approach. Why does s390 require this feature to
> be the default and not any other architecture? The qemu commit log for
> this feature indicates that it was intended to speed up shutdown and
> cleanup of huge vms, and particularly protected vms. It mentioned that
> this is often the case on s390x, but is CPU architecture really the best
> deciding factor for enabling this feature? Any existing s390 domain that
> was defined on a previous version of libvirt will automatically change
> to async-teardown after upgrading libvirt. That seems potentially risky.
> What are the potential downsides?
I will add an explanation into the commit message.
>
>
>>
>> Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
>> ---
>
> [snip]
>
>> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
>> index 8f77e8fc58..8ed3283546 100644
>> --- a/src/qemu/qemu_domain.c
>> +++ b/src/qemu/qemu_domain.c
>> @@ -4081,6 +4081,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver
>> *driver,
>> bool addDefaultUSBMouse = false;
>> bool addPanicDevice = false;
>> bool addITCOWatchdog = false;
>> + bool addAsyncTeardown = false;
>> /* add implicit input devices */
>> if (qemuDomainDefAddImplicitInputDevice(def) < 0)
>> @@ -4164,6 +4165,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver
>> *driver,
>> addDefaultUSB = false;
>> addPanicDevice = true;
>> addPCIRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_ZPCI);
>> + addAsyncTeardown = virQEMUCapsGet(qemuCaps,
>> QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN);
>> break;
>> case VIR_ARCH_SPARC:
>> @@ -4334,6 +4336,11 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver
>> *driver,
>> }
>> }
>> + if (addAsyncTeardown &&
>> + def->features[VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN] ==
>> VIR_TRISTATE_BOOL_ABSENT)
>> + def->features[VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN] =
>> VIR_TRISTATE_BOOL_YES;
>> +
>> +
>
> Wouldn't qemuDomainDefEnableDefaultFeatures() be a better location to
> put this?
You are correct. I will move the code into that method and include a
comment with reasoning why this feature is enabled on S390 hosts by default.
>
>> if (qemuDomainDefAddDefaultAudioBackend(driver, def) < 0)
>> return -1;
>> @@ -6694,6 +6701,13 @@ qemuDomainDefFormatBufInternal(virQEMUDriver
>> *driver,
>> }
>> }
>> }
>> +
>> + /* Remove asynchronous teardown enablement for backwards
>> compatibility
>> + * on S390 as it gets autogenerated on S390 if supported anyway.
>> + */
>> + if (ARCH_IS_S390(def->os.arch) &&
>> + def->features[VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN] !=
>> VIR_TRISTATE_BOOL_YES)
>> + def->features[VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN] =
>> VIR_TRISTATE_BOOL_ABSENT;
>> }
>
>
> Jonathon
>
--
Mit freundlichen Grüßen/Kind regards
Boris Fiuczynski
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
© 2016 - 2026 Red Hat, Inc.