Add documentation for KVM_CAP_S390_PROTECTED capability and the KVM_S390_PV_COMMAND ioctl.
Unified · Split
| @@ -4648,6 +4648,54 @@ the clear cpu reset definition in the POP. However, the cpu is not put · 4647 unmodified lines | |||
| 4648 | into ESA mode. This reset is a superset of the initial reset. | 4648 | into ESA mode. This reset is a superset of the initial reset. |
| 4649 | 4649 | ||
| 4650 | 4650 | ||
| 4651 | 4.125 KVM_S390_PV_COMMAND | ||
| 4652 | ------------------------- | ||
| 4653 | |||
| 4654 | :Capability: KVM_CAP_S390_PROTECTED | ||
| 4655 | :Architectures: s390 | ||
| 4656 | :Type: vm ioctl | ||
| 4657 | :Parameters: struct kvm_pv_cmd | ||
| 4658 | :Returns: 0 on success, < 0 on error | ||
| 4659 | |||
| 4660 | :: | ||
| 4661 | |||
| 4662 | struct kvm_pv_cmd { | ||
| 4663 | __u32 cmd; /* Command to be executed */ | ||
| 4664 | __u16 rc; /* Ultravisor return code */ | ||
| 4665 | __u16 rrc; /* Ultravisor return reason code */ | ||
| 4666 | __u64 data; /* Data or address */ | ||
| 4667 | __u32 flags; /* flags for future extensions. Must be 0 for now */ | ||
| 4668 | __u32 reserved[3]; | ||
| 4669 | }; | ||
| 4670 | |||
| 4671 | cmd values: | ||
| 4672 | |||
| 4673 | KVM_PV_ENABLE | ||
| 4674 | Allocate memory and register the VM with the Ultravisor, thereby | ||
| 4675 | donating memory to the Ultravisor that will become inaccessible to | ||
| 4676 | KVM. All existing CPUs are converted to protected ones. After this | ||
| 4677 | command has succeeded, any CPU added via hotplug will become | ||
| 4678 | protected during its creation as well. | ||
| 4679 | |||
| 4680 | KVM_PV_DISABLE | ||
| 4681 | |||
| 4682 | Deregister the VM from the Ultravisor and reclaim the memory that | ||
| 4683 | had been donated to the Ultravisor, making it usable by the kernel | ||
| 4684 | again. All registered VCPUs are converted back to non-protected | ||
| 4685 | ones. | ||
| 4686 | |||
| 4687 | KVM_PV_VM_SET_SEC_PARMS | ||
| 4688 | Pass the image header from VM memory to the Ultravisor in | ||
| 4689 | preparation of image unpacking and verification. | ||
| 4690 | |||
| 4691 | KVM_PV_VM_UNPACK | ||
| 4692 | Unpack (protect and decrypt) a page of the encrypted boot image. | ||
| 4693 | |||
| 4694 | KVM_PV_VM_VERIFY | ||
| 4695 | Verify the integrity of the unpacked image. Only if this succeeds, | ||
| 4696 | KVM is allowed to start protected VCPUs. | ||
| 4697 | |||
| 4698 | |||
| 4651 | 5. The kvm_run structure | 4699 | 5. The kvm_run structure |
| 4652 | ======================== | 4700 | ======================== |
| 4653 | 4701 | ||
| @@ -6026,3 +6074,14 @@ Architectures: s390 · 1372 unmodified lines | |||
| 6026 | 6074 | ||
| 6027 | This capability indicates that the KVM_S390_NORMAL_RESET and | 6075 | This capability indicates that the KVM_S390_NORMAL_RESET and |
| 6028 | KVM_S390_CLEAR_RESET ioctls are available. | 6076 | KVM_S390_CLEAR_RESET ioctls are available. |
| 6077 | |||
| 6078 | 8.23 KVM_CAP_S390_PROTECTED | ||
| 6079 | |||
| 6080 | Architecture: s390 | ||
| 6081 | |||
| 6082 | |||
| 6083 | This capability indicates that the Ultravisor has been initialized and | ||
| 6084 | KVM can therefore start protected VMs. | ||
| 6085 | This capability governs the KVM_S390_PV_COMMAND ioctl and the | ||
| 6086 | KVM_MP_STATE_LOAD MP_STATE. KVM_SET_MP_STATE can fail for protected | ||
| 6087 | guests when the state change is invalid. | ||