@@ -6518,6 +6518,40 @@ the capability to be present.
65186518
65196519`flags ` must currently be zero.
65206520
6521+ 4.144 KVM_S390_KEYOP
6522+ --------------------
6523+
6524+ :Capability: KVM_CAP_S390_KEYOP
6525+ :Architectures: s390
6526+ :Type: vm ioctl
6527+ :Parameters: struct kvm_s390_keyop (in/out)
6528+ :Returns: 0 in case of success, < 0 on error
6529+
6530+ The specified key operation is performed on the given guest address. The
6531+ previous storage key (or the relevant part thereof) will be returned in
6532+ `key `.
6533+
6534+ ::
6535+
6536+ struct kvm_s390_keyop {
6537+ __u64 guest_addr;
6538+ __u8 key;
6539+ __u8 operation;
6540+ };
6541+
6542+ Currently supported values for ``operation ``:
6543+
6544+ KVM_S390_KEYOP_ISKE
6545+ Returns the storage key for the guest address ``guest_addr `` in ``key ``.
6546+
6547+ KVM_S390_KEYOP_RRBE
6548+ Resets the reference bit for the guest address ``guest_addr ``, returning the
6549+ R and C bits of the old storage key in ``key ``; the remaining fields of
6550+ the storage key will be set to 0.
6551+
6552+ KVM_S390_KEYOP_SSKE
6553+ Sets the storage key for the guest address ``guest_addr `` to the key
6554+ specified in ``key ``, returning the previous value in ``key ``.
65216555
65226556.. _kvm_run :
65236557
@@ -9384,6 +9418,14 @@ The presence of this capability indicates that KVM_RUN will update the
93849418KVM_RUN_X86_GUEST_MODE bit in kvm_run.flags to indicate whether the
93859419vCPU was executing nested guest code when it exited.
93869420
9421+ 8.46 KVM_CAP_S390_KEYOP
9422+ -----------------------
9423+
9424+ :Architectures: s390
9425+
9426+ The presence of this capability indicates that the KVM_S390_KEYOP ioctl is
9427+ available.
9428+
93879429KVM exits with the register state of either the L1 or L2 guest
93889430depending on which executed at the time of an exit. Userspace must
93899431take care to differentiate between these cases.
0 commit comments