KVM: s390: Extend MEM_OP ioctl by storage key checked cmpxchg
authorJanis Schoetterl-Glausch <scgl@linux.ibm.com>
Mon, 6 Feb 2023 16:46:00 +0000 (17:46 +0100)
committerJanosch Frank <frankja@linux.ibm.com>
Tue, 7 Feb 2023 17:06:00 +0000 (18:06 +0100)
commit3fd49805d19d1c566e92358d2e3d9fadb3b5ec16
tree4de702216abb87beb4214e4a2ae5d517b63ac27c
parent701422b3438240a98000e0db3ef68d4db7991918
KVM: s390: Extend MEM_OP ioctl by storage key checked cmpxchg

User space can use the MEM_OP ioctl to make storage key checked reads
and writes to the guest, however, it has no way of performing atomic,
key checked, accesses to the guest.
Extend the MEM_OP ioctl in order to allow for this, by adding a cmpxchg
op. For now, support this op for absolute accesses only.

This op can be used, for example, to set the device-state-change
indicator and the adapter-local-summary indicator atomically.

Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Link: https://lore.kernel.org/r/20230206164602.138068-13-scgl@linux.ibm.com
Message-Id: <20230206164602.138068-13-scgl@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
arch/s390/kvm/gaccess.c
arch/s390/kvm/gaccess.h
arch/s390/kvm/kvm-s390.c
include/uapi/linux/kvm.h