From: Heiko Carstens <hca@linux.ibm.com>
To: Steffen Eiden <seiden@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
linux-kernel@vger.kernel.org,
Viktor Mihajlovski <mihajlov@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
Nico Boehr <nrb@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Hendrik Brueckner <brueckner@linux.ibm.com>
Subject: Re: [PATCH 1/5] s390/uvdevice: Add info IOCTL
Date: Fri, 12 May 2023 14:51:35 +0200 [thread overview]
Message-ID: <ZF42V9fJFtRLR1Ua@osiris> (raw)
In-Reply-To: <20230512093153.206378-2-seiden@linux.ibm.com>
On Fri, May 12, 2023 at 11:31:49AM +0200, Steffen Eiden wrote:
> Add an IOCTL that allows userspace to find out which IOCTLs the uvdevice
> supports without trial and error.
>
> Explicitly expose the IOCTL nr for the request types.
>
> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
> ---
> arch/s390/include/uapi/asm/uvdevice.h | 45 +++++++++++++++-
> drivers/s390/char/uvdevice.c | 77 ++++++++++++++++++++++++---
> 2 files changed, 114 insertions(+), 8 deletions(-)
...
> +static void __init set_supp_uv_cmds(struct uvio_uvdev_info *info)
> +{
> + int i;
> +
> + for (i = 0; i < UVIO_IOCTL_NUM_IOCTLS; i++) {
> + if (ioctl_nr_to_uvc_bit[i] == -1UL)
> + continue;
> + if (!test_bit_inv(ioctl_nr_to_uvc_bit[i], uv_info.inst_calls_list))
> + continue;
> + set_bit(i, (unsigned long *)&info->supp_uv_cmds);
Just a minor thing: please use
__set_bit(i, (unsigned long *)&info->supp_uv_cmds);
set_bit() is the atomic variant which may even generate a compare and swap
loop (dependent on config options) to set bits, which is not what is needed
here. Didn't see that in previous version.
So if atomicity is not needed, please use __set_bit() instead.
next prev parent reply other threads:[~2023-05-12 12:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-12 9:31 [PATCH 0/5] s390/uvdevice: Expose secret UVCs Steffen Eiden
2023-05-12 9:31 ` [PATCH 1/5] s390/uvdevice: Add info IOCTL Steffen Eiden
2023-05-12 12:51 ` Heiko Carstens [this message]
2023-05-13 6:10 ` kernel test robot
2023-05-12 9:31 ` [PATCH 2/5] s390/uvdevice: Add 'Add Secret' UVC Steffen Eiden
2023-05-12 9:31 ` [PATCH 3/5] s390/uvdevice: Add 'List Secrets' UVC Steffen Eiden
2023-05-17 16:03 ` Claudio Imbrenda
2023-05-17 16:11 ` Steffen Eiden
2023-05-12 9:31 ` [PATCH 4/5] s390/uvdevice: Add 'Lock Secret Store' UVC Steffen Eiden
2023-05-12 9:31 ` [PATCH 5/5] s390/uv: Update query for secret-UVCs Steffen Eiden
2023-05-12 12:53 ` Heiko Carstens
2023-05-12 13:27 ` Janosch Frank
2023-05-12 15:34 ` Heiko Carstens
2023-05-17 15:54 ` Claudio Imbrenda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZF42V9fJFtRLR1Ua@osiris \
--to=hca@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=brueckner@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mihajlov@linux.ibm.com \
--cc=nrb@linux.ibm.com \
--cc=seiden@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox