qemu-e2k/include/hw/s390x
Claudio Imbrenda c3a073c610 s390x/pv: Add support for asynchronous teardown for reboot
This patch adds support for the asynchronous teardown for reboot for
protected VMs.

When attempting to tear down a protected VM, try to use the new
asynchronous interface first. If that fails, fall back to the classic
synchronous one.

The asynchronous interface involves invoking the new
KVM_PV_ASYNC_DISABLE_PREPARE command for the KVM_S390_PV_COMMAND ioctl.

This will prepare the current protected VM for asynchronous teardown.
Once the protected VM is prepared for teardown, execution can continue
immediately.

Once the protected VM has been prepared, a new thread is started to
actually perform the teardown. The new thread uses the new
KVM_PV_ASYNC_DISABLE command for the KVM_S390_PV_COMMAND ioctl. The
previously prepared protected VM is torn down in the new thread.

Once KVM_PV_ASYNC_DISABLE is invoked, it is possible to use
KVM_PV_ASYNC_DISABLE_PREPARE again. If a protected VM has already been
prepared and its cleanup has not started, it will not be possible to
prepare a new VM. In that case the classic synchronous teardown has to
be performed.

The synchronous teardown will now also clean up any prepared VMs whose
asynchronous teardown has not been initiated yet.

This considerably speeds up the reboot of a protected VM; for large VMs
especially, it could take a long time to perform a reboot with the
traditional synchronous teardown, while with this patch it is almost
immediate.

Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230214163035.44104-3-imbrenda@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-02-27 09:15:39 +01:00
..
3270-ccw.h
adapter.h
ap-bridge.h
ap-device.h
css-bridge.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
css.h css: fix actl handling for unit exceptions 2021-09-06 16:23:08 +02:00
ebcdic.h
event-facility.h
ioinst.h s390x/css: fix PMCW invalid mask 2022-01-17 08:34:19 +01:00
pv.h s390x/pv: Add support for asynchronous teardown for reboot 2023-02-27 09:15:39 +01:00
s390_flic.h s390x: move S390_ADAPTER_SUPPRESSIBLE 2021-03-26 09:33:50 +01:00
s390-ccw.h
s390-pci-bus.h s390x/pci: reset ISM passthrough devices on shutdown and system reset 2022-12-15 15:02:34 +01:00
s390-pci-clp.h Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
s390-pci-inst.h s390x/pci: create a header dedicated to PCI CLP 2020-11-01 12:30:52 -07:00
s390-pci-kvm.h s390x/pci: enable adapter event notification for interpreted devices 2022-09-26 17:23:47 +02:00
s390-pci-vfio.h s390x/pci: add routine to get host function handle from CLP info 2022-09-26 17:23:47 +02:00
s390-virtio-ccw.h Revert "s390x/s390-virtio-ccw: add zpcii-disable machine property" 2022-11-08 10:10:57 +01:00
sclp.h s390: guest support for diagnose 0x318 2020-10-02 13:52:49 +02:00
storage-attributes.h
storage-keys.h hw/s390x/s390-skeys: lazy storage key enablement under TCG 2021-09-06 16:24:05 +02:00
tod.h target/s390x: start moving TCG-only code to tcg/ 2021-07-07 14:01:56 +02:00
vfio-ccw.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00