KVM: s390: Add optional storage key checking to MEMOP IOCTL
authorJanis Schoetterl-Glausch <scgl@linux.ibm.com>
Fri, 11 Feb 2022 18:22:10 +0000 (19:22 +0100)
committerChristian Borntraeger <borntraeger@linux.ibm.com>
Mon, 14 Feb 2022 15:12:57 +0000 (16:12 +0100)
commite9e9feebcbc14b174fef862842f8cc9a388e1db3
treedee98779651470e6df4534688a926db761e7bd7e
parentc7ef9ebbed20b860f70cc7bece65622b570a8a93
KVM: s390: Add optional storage key checking to MEMOP IOCTL

User space needs a mechanism to perform key checked accesses when
emulating instructions.

The key can be passed as an additional argument.
Having an additional argument is flexible, as user space can
pass the guest PSW's key, in order to make an access the same way the
CPU would, or pass another key if necessary.

Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Link: https://lore.kernel.org/r/20220211182215.2730017-6-scgl@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
arch/s390/kvm/kvm-s390.c
include/uapi/linux/kvm.h