History

KVM: s390: Add vm IOCTL for key checked guest absolute memory access

Channel I/O honors storage keys and is performed on absolute memory. For I/O emulation user space therefore needs to be able to do key checked accesses. The vm IOCTL supports read/write accesses, as well as checking if an access would succeed. Unlike relying on KVM_S390_GET_SKEYS for key checking would, the vm IOCTL performs the check in lockstep with the read or write, by, ultimately, mapping the access to move instructions that support key protection checking with a supplied key. Fetch and storage protection override are not applicable to absolute accesses and so are not applied as they are when using the vcpu memop.

Janis Schoetterl-Glausch committed 4 years ago

Commit ef11c941 parent e9e9fee4 files · +161 −0Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/kvm.h+2−0
@@ -575,6 +575,8 @@ struct kvm_s390_mem_op { · 574 unmodified lines
575575 #define KVM_S390_MEMOP_LOGICAL_WRITE 1
576576 #define KVM_S390_MEMOP_SIDA_READ 2
577577 #define KVM_S390_MEMOP_SIDA_WRITE 3
578+#define KVM_S390_MEMOP_ABSOLUTE_READ 4
579+#define KVM_S390_MEMOP_ABSOLUTE_WRITE 5
578580 /* flags for kvm_s390_mem_op->flags */
579581 #define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0)
580582 #define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1)