Skip to content

Commit d945992

Browse files
Claudio Imbrendafrankjaa
authored andcommitted
KVM: s390: pv: api documentation for asynchronous destroy
Add documentation for the new commands added to the KVM_S390_PV_COMMAND ioctl. Signed-off-by: Claudio Imbrenda <[email protected]> Reviewed-by: Nico Boehr <[email protected]> Reviewed-by: Steffen Eiden <[email protected]> Reviewed-by: Janosch Frank <[email protected]> Link: https://lore.kernel.org/r/[email protected] Message-Id: <[email protected]> Signed-off-by: Janosch Frank <[email protected]>
1 parent fb491d5 commit d945992

File tree

1 file changed

+37
-4
lines changed

1 file changed

+37
-4
lines changed

Documentation/virt/kvm/api.rst

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5163,10 +5163,13 @@ KVM_PV_ENABLE
51635163
===== =============================
51645164

51655165
KVM_PV_DISABLE
5166-
Deregister the VM from the Ultravisor and reclaim the memory that
5167-
had been donated to the Ultravisor, making it usable by the kernel
5168-
again. All registered VCPUs are converted back to non-protected
5169-
ones.
5166+
Deregister the VM from the Ultravisor and reclaim the memory that had
5167+
been donated to the Ultravisor, making it usable by the kernel again.
5168+
All registered VCPUs are converted back to non-protected ones. If a
5169+
previous protected VM had been prepared for asynchonous teardown with
5170+
KVM_PV_ASYNC_CLEANUP_PREPARE and not subsequently torn down with
5171+
KVM_PV_ASYNC_CLEANUP_PERFORM, it will be torn down in this call
5172+
together with the current protected VM.
51705173

51715174
KVM_PV_VM_SET_SEC_PARMS
51725175
Pass the image header from VM memory to the Ultravisor in
@@ -5289,6 +5292,36 @@ KVM_PV_DUMP
52895292
authentication tag all of which are needed to decrypt the dump at a
52905293
later time.
52915294

5295+
KVM_PV_ASYNC_CLEANUP_PREPARE
5296+
:Capability: KVM_CAP_S390_PROTECTED_ASYNC_DISABLE
5297+
5298+
Prepare the current protected VM for asynchronous teardown. Most
5299+
resources used by the current protected VM will be set aside for a
5300+
subsequent asynchronous teardown. The current protected VM will then
5301+
resume execution immediately as non-protected. There can be at most
5302+
one protected VM prepared for asynchronous teardown at any time. If
5303+
a protected VM had already been prepared for teardown without
5304+
subsequently calling KVM_PV_ASYNC_CLEANUP_PERFORM, this call will
5305+
fail. In that case, the userspace process should issue a normal
5306+
KVM_PV_DISABLE. The resources set aside with this call will need to
5307+
be cleaned up with a subsequent call to KVM_PV_ASYNC_CLEANUP_PERFORM
5308+
or KVM_PV_DISABLE, otherwise they will be cleaned up when KVM
5309+
terminates. KVM_PV_ASYNC_CLEANUP_PREPARE can be called again as soon
5310+
as cleanup starts, i.e. before KVM_PV_ASYNC_CLEANUP_PERFORM finishes.
5311+
5312+
KVM_PV_ASYNC_CLEANUP_PERFORM
5313+
:Capability: KVM_CAP_S390_PROTECTED_ASYNC_DISABLE
5314+
5315+
Tear down the protected VM previously prepared for teardown with
5316+
KVM_PV_ASYNC_CLEANUP_PREPARE. The resources that had been set aside
5317+
will be freed during the execution of this command. This PV command
5318+
should ideally be issued by userspace from a separate thread. If a
5319+
fatal signal is received (or the process terminates naturally), the
5320+
command will terminate immediately without completing, and the normal
5321+
KVM shutdown procedure will take care of cleaning up all remaining
5322+
protected VMs, including the ones whose teardown was interrupted by
5323+
process termination.
5324+
52925325
4.126 KVM_XEN_HVM_SET_ATTR
52935326
--------------------------
52945327

0 commit comments

Comments
 (0)