History

KVM: s390: protvirt: Add KVM api documentation

Add documentation for KVM_CAP_S390_PROTECTED capability and the KVM_S390_PV_COMMAND ioctl.

Janosch Frank committed 7 years ago

Commit 04ed89d1 parent 13da9ae1 file · +59 −0Browse files

Unified · Split

Documentation/virt/kvm/api.rst+59−0
@@ -4648,6 +4648,54 @@ the clear cpu reset definition in the POP. However, the cpu is not put · 4647 unmodified lines
4648into ESA mode. This reset is a superset of the initial reset.4648into ESA mode. This reset is a superset of the initial reset.
4649 4649
4650 4650
46514.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
4671cmd values:
4672
4673KVM_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
4680KVM_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
4687KVM_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
4691KVM_PV_VM_UNPACK
4692 Unpack (protect and decrypt) a page of the encrypted boot image.
4693
4694KVM_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
46515. The kvm_run structure46995. The kvm_run structure
4652========================4700========================
4653 4701
@@ -6026,3 +6074,14 @@ Architectures: s390 · 1372 unmodified lines
6026 6074
6027This capability indicates that the KVM_S390_NORMAL_RESET and6075This capability indicates that the KVM_S390_NORMAL_RESET and
6028KVM_S390_CLEAR_RESET ioctls are available.6076KVM_S390_CLEAR_RESET ioctls are available.
6077
60788.23 KVM_CAP_S390_PROTECTED
6079
6080Architecture: s390
6081
6082
6083This capability indicates that the Ultravisor has been initialized and
6084KVM can therefore start protected VMs.
6085This capability governs the KVM_S390_PV_COMMAND ioctl and the
6086KVM_MP_STATE_LOAD MP_STATE. KVM_SET_MP_STATE can fail for protected
6087guests when the state change is invalid.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t