[PATCH v6 15/17] KVM: s390: pv: api documentation for asynchronous destroy

Claudio Imbrenda
2021-12-03T16:58:45Z

Add documentation for the new commands added to the KVM_S390_PV_COMMAND
ioctl.

Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
---
Documentation/virt/kvm/api.rst | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index aeeb071c7688..f4d981cd58fa 100644
--- a/Documentation/virt/kvm/api.rst
+++ b/Documentation/virt/kvm/api.rst
@@ -4975,11 +4975,13 @@ KVM_PV_ENABLE
===== =============================

KVM_PV_DISABLE
-
Deregister the VM from the Ultravisor and reclaim the memory that
had been donated to the Ultravisor, making it usable by the kernel
- again. All registered VCPUs are converted back to non-protected
- ones.
+ again. All registered VCPUs are converted back to non-protected
+ ones. If a previous VM had been prepared for asynchonous teardown
+ with KVM_PV_ASYNC_DISABLE_PREPARE and not actually torn down with
+ KVM_PV_ASYNC_DISABLE, it will be torn down in this call together with
+ the current VM.

KVM_PV_VM_SET_SEC_PARMS
Pass the image header from VM memory to the Ultravisor in
@@ -4992,6 +4994,19 @@ KVM_PV_VM_VERIFY
Verify the integrity of the unpacked image. Only if this succeeds,
KVM is allowed to start protected VCPUs.

+KVM_PV_ASYNC_DISABLE_PREPARE
+ Prepare the current protected VM for asynchronous teardown. The current
+ VM will then continue immediately as non-protected. If a protected VM had
+ already been set aside without starting the teardown process, this call
+ will fail. In this case the userspace process should issue a normal
+ KVM_PV_DISABLE.
+
+KVM_PV_ASYNC_DISABLE
+ Tear down the protected VM previously set aside for asynchronous teardown.
+ This PV command should ideally be issued by userspace from a separate
+ thread. If a fatal signal is received (or the process terminates
+ naturally), the command will terminate immediately without completing.
+
4.126 KVM_X86_SET_MSR_FILTER
----------------------------

--
2.31.1