[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DFO7J08IZ4HZ.3O6LSE6J09CD3@linux.ibm.com>
Date: Wed, 14 Jan 2026 10:33:22 +0100
From: "Christoph Schlameuss" <schlameuss@...ux.ibm.com>
To: "Claudio Imbrenda" <imbrenda@...ux.ibm.com>, <kvm@...r.kernel.org>
Cc: <linux-kernel@...r.kernel.org>, <linux-s390@...r.kernel.org>,
<borntraeger@...ibm.com>, <frankja@...ux.ibm.com>, <nsg@...ux.ibm.com>,
<nrb@...ux.ibm.com>, <seiden@...ux.ibm.com>, <gra@...ux.ibm.com>,
<schlameuss@...ux.ibm.com>, <hca@...ux.ibm.com>, <svens@...ux.ibm.com>,
<agordeev@...ux.ibm.com>, <gor@...ux.ibm.com>, <david@...hat.com>,
<gerald.schaefer@...ux.ibm.com>
Subject: Re: [PATCH v6 28/28] KVM: s390: Storage key manipulation IOCTL
On Mon Dec 22, 2025 at 5:50 PM CET, Claudio Imbrenda wrote:
> Add a new IOCTL to allow userspace to manipulate storage keys directly.
>
> This will make it easier to write selftests related to storage keys.
>
> Signed-off-by: Claudio Imbrenda <imbrenda@...ux.ibm.com>
Please add some user documentation for the new IOCTL.
[...]
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index dddb781b0507..845417e56778 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -1219,6 +1219,15 @@ struct kvm_vfio_spapr_tce {
> __s32 tablefd;
> };
>
> +#define KVM_S390_KEYOP_SSKE 0x01
> +#define KVM_S390_KEYOP_ISKE 0x02
> +#define KVM_S390_KEYOP_RRBE 0x03
Just a nitpik, but why this order? In the arch the order is ISKE, SSKE, RRBE.
Would it not be more logical to keep that order?
> +struct kvm_s390_keyop {
> + __u64 user_addr;
> + __u8 key;
> + __u8 operation;
> +};
> +
> /*
> * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns
> * a vcpu fd.
> @@ -1238,6 +1247,7 @@ struct kvm_vfio_spapr_tce {
> #define KVM_S390_UCAS_MAP _IOW(KVMIO, 0x50, struct kvm_s390_ucas_mapping)
> #define KVM_S390_UCAS_UNMAP _IOW(KVMIO, 0x51, struct kvm_s390_ucas_mapping)
> #define KVM_S390_VCPU_FAULT _IOW(KVMIO, 0x52, unsigned long)
> +#define KVM_S390_KEYOP _IOWR(KVMIO, 0x53, struct kvm_s390_keyop)
>
> /* Device model IOC */
> #define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60)
Powered by blists - more mailing lists