mbox series

[v1,0/9] KVM: s390: Extend MEM_OP ioctl by storage key checked cmpxchg

Message ID 20220930210751.225873-1-scgl@linux.ibm.com (mailing list archive)
Headers show
Series KVM: s390: Extend MEM_OP ioctl by storage key checked cmpxchg | expand

Message

Janis Schoetterl-Glausch Sept. 30, 2022, 9:07 p.m. UTC
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
mode. For now, support this mode for absolute accesses only.

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

Janis Schoetterl-Glausch (9):
  s390/uaccess: Add storage key checked cmpxchg access to user space
  KVM: s390: Extend MEM_OP ioctl by storage key checked cmpxchg
  Documentation: KVM: s390: Describe KVM_S390_MEMOP_F_CMPXCHG
  KVM: s390: selftest: memop: Pass mop_desc via pointer
  KVM: s390: selftest: memop: Replace macros by functions
  KVM: s390: selftest: memop: Add bad address test
  KVM: s390: selftest: memop: Add cmpxchg tests
  KVM: s390: selftest: memop: Fix typo
  KVM: s390: selftest: memop: Fix wrong address being used in test

 Documentation/virt/kvm/api.rst            |  18 +-
 include/uapi/linux/kvm.h                  |   5 +
 arch/s390/include/asm/uaccess.h           | 187 ++++++
 arch/s390/kvm/gaccess.h                   |   4 +
 arch/s390/kvm/gaccess.c                   |  56 ++
 arch/s390/kvm/kvm-s390.c                  |  50 +-
 tools/testing/selftests/kvm/s390x/memop.c | 704 +++++++++++++++++-----
 7 files changed, 874 insertions(+), 150 deletions(-)


base-commit: f76349cf41451c5c42a99f18a9163377e4b364ff