[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/2] s390x/pv: Add support for asynchronous teardown for r
Re: [PATCH v3 2/2] s390x/pv: Add support for asynchronous teardown for reboot
Thu, 16 Feb 2023 09:43:49 +0100
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0
On 14/02/2023 17.30, Claudio Imbrenda wrote:
This patch adds support for the asynchronous teardown for reboot for
When attempting to tear down a protected VM, try to use the new
asynchronous interface first. If that fails, fall back to the classic
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
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
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
Signed-off-by: Claudio Imbrenda <firstname.lastname@example.org>
hw/s390x/pv.c | 28 ++++++++++++++++++++++++++++
hw/s390x/s390-virtio-ccw.c | 5 ++++-
include/hw/s390x/pv.h | 2 ++
3 files changed, 34 insertions(+), 1 deletion(-)
Reviewed-by: Thomas Huth <email@example.com>