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.
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -575,6 +575,8 @@ struct kvm_s390_mem_op { · 574 unmodified lines | |||
| 575 | #define KVM_S390_MEMOP_LOGICAL_WRITE 1 | 575 | #define KVM_S390_MEMOP_LOGICAL_WRITE 1 |
| 576 | #define KVM_S390_MEMOP_SIDA_READ 2 | 576 | #define KVM_S390_MEMOP_SIDA_READ 2 |
| 577 | #define KVM_S390_MEMOP_SIDA_WRITE 3 | 577 | #define KVM_S390_MEMOP_SIDA_WRITE 3 |
| 578 | #define KVM_S390_MEMOP_ABSOLUTE_READ 4 | ||
| 579 | #define KVM_S390_MEMOP_ABSOLUTE_WRITE 5 | ||
| 578 | /* flags for kvm_s390_mem_op->flags */ | 580 | /* flags for kvm_s390_mem_op->flags */ |
| 579 | #define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0) | 581 | #define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0) |
| 580 | #define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1) | 582 | #define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1) |