@@ -5163,10 +5163,13 @@ KVM_PV_ENABLE
5163
5163
===== =============================
5164
5164
5165
5165
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.
5170
5173
5171
5174
KVM_PV_VM_SET_SEC_PARMS
5172
5175
Pass the image header from VM memory to the Ultravisor in
@@ -5289,6 +5292,36 @@ KVM_PV_DUMP
5289
5292
authentication tag all of which are needed to decrypt the dump at a
5290
5293
later time.
5291
5294
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
+
5292
5325
4.126 KVM_XEN_HVM_SET_ATTR
5293
5326
--------------------------
5294
5327
0 commit comments