From: Heiko Carstens <hca@linux.ibm.com>
To: "Jason J. Herne" <jjherne@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
fiuczy@linux.ibm.com, akrowiak@linux.ibm.com,
borntraeger@de.ibm.com, agordeev@linux.ibm.com,
gor@linux.ibm.com
Subject: Re: [PATCH v2] s390/vfio-ap: Driver feature advertisement
Date: Wed, 11 Sep 2024 08:57:07 +0200 [thread overview]
Message-ID: <20240911065707.6563-A-hca@linux.ibm.com> (raw)
In-Reply-To: <20240910113440.8107-1-jjherne@linux.ibm.com>
On Tue, Sep 10, 2024 at 07:34:40AM -0400, Jason J. Herne wrote:
> Advertise features of the driver for the benefit of automated tooling
> like Libvirt and mdevctl.
>
> Signed-off-by: Jason J. Herne <jjherne@linux.ibm.com>
> Reviewed-by: Anthony Krowiak <akrowiak@linux.ibm.com>
> Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
> ---
> Documentation/arch/s390/vfio-ap.rst | 34 +++++++++++++++++++++++++++++
> drivers/s390/crypto/vfio_ap_drv.c | 13 +++++++++++
> 2 files changed, 47 insertions(+)
...
> +Driver Features
> +===============
> +The vfio_ap driver exposes a sysfs file containing supported features.
> +This exists so third party tools (like Libvirt and mdevctl) can query the
> +availability of specific features.
> +
> +The features list can be found here: /sys/bus/matrix/devices/matrix/features
> +
> +Entries are \n delimited. Each entry contains a key value pair. The key is made
> +up of a combination of alphanumeric and underscore characters. The separator
> +consists of a space, a colon and then another space. The value consists of
> +alphanumeric, space, and underscore characters.
> +
> +Example:
> +cat /sys/bus/matrix/devices/matrix/features
> +flags : guest_matrix dyn ap_config
> +
> +Presently only a single field named flags is defined. It is meant to advertise a
> +list of features the driver provides. The flags fields advertises the following
> +features:
I stumbled across this only now: sysfs files are not supposed to have
several key value pairs. Actually the file(name) itself is supposed to
be the key and its contents are the value. So I would expect:
cat /sys/bus/matrix/devices/matrix/flags
guest_matrix dyn ap_config
Which is also easier to parse. Is there a good reason why this does
not follow the general approach for sysfs files?
next prev parent reply other threads:[~2024-09-11 6:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-10 11:34 [PATCH v2] s390/vfio-ap: Driver feature advertisement Jason J. Herne
2024-09-11 6:57 ` Heiko Carstens [this message]
2024-09-12 12:24 ` Jason J. Herne
2024-09-12 12:36 ` Boris Fiuczynski
2024-09-13 16:24 ` Anthony Krowiak
-- strict thread matches above, loose matches on Subject: below --
2024-09-10 11:34 Jason J. Herne
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=20240911065707.6563-A-hca@linux.ibm.com \
--to=hca@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=akrowiak@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=fiuczy@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=jjherne@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/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