On 05/07/2023 08.20, Boris Fiuczynski wrote:
Enable by default asynchronous teardown on S390 hosts and add tests
for
asynchronous teardown autogeneration support.
On S390 hosts, Secure Execution guests can take a long time to shutdown,
since the memory cleanup can take a long time. Since there is no
practical way to determine whether a S390 guest is running in Secure
Execution mode, and since the asynchronous teardown does not impact
normal (not Secure Execution) guests or guests without large memory
configurations, we enable asynchronous teardown by default on S390.
A user can select to override the default in the guest domain XML.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
---
src/qemu/qemu_domain.c | 19 +++++++++++
.../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, 333 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 94587638c3..884f1599b4 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4402,6 +4402,18 @@ qemuDomainDefEnableDefaultFeatures(virDomainDef *def,
* capabilities, we still want to enable this */
def->features[VIR_DOMAIN_FEATURE_GIC] = VIR_TRISTATE_SWITCH_ON;
}
+
+ /* Enabled asynchronous teardown by default on S390 hosts as Secure
+ * Execution guests can take a long time to shutdown, since the memory
+ * cleanup can take a long time. Since there is no üractical way to
s/üractical/practical/
With the typo fixed:
Reviewed-by: Thomas Huth <thuth(a)redhat.com>