diff options
| author | Jason J. Herne <jjherne@linux.ibm.com> | 2024-09-16 08:01:23 -0400 |
|---|---|---|
| committer | Vasily Gorbik <gor@linux.ibm.com> | 2024-09-23 17:57:04 +0200 |
| commit | 2d8721364ce83956d0a184a64052928589ef15df (patch) | |
| tree | c4f4a9dac9c075952639f56c54ce0a011b4a4f1e /drivers/s390 | |
| parent | d714abee5fb64c4817dce477bd7f2bd1bb4fe814 (diff) | |
| download | linux-2d8721364ce83956d0a184a64052928589ef15df.tar.gz linux-2d8721364ce83956d0a184a64052928589ef15df.tar.bz2 linux-2d8721364ce83956d0a184a64052928589ef15df.zip | |
s390/vfio-ap: Driver feature advertisement
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>
Link: https://lore.kernel.org/r/20240916120123.11484-1-jjherne@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390')
| -rw-r--r-- | drivers/s390/crypto/vfio_ap_drv.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c index 4aeb3e1213c7..67a807e2e75b 100644 --- a/drivers/s390/crypto/vfio_ap_drv.c +++ b/drivers/s390/crypto/vfio_ap_drv.c @@ -26,6 +26,18 @@ MODULE_LICENSE("GPL v2"); struct ap_matrix_dev *matrix_dev; debug_info_t *vfio_ap_dbf_info; +static ssize_t features_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + return sysfs_emit(buf, "guest_matrix hotplug ap_config\n"); +} +static DEVICE_ATTR_RO(features); + +static struct attribute *matrix_dev_attrs[] = { + &dev_attr_features.attr, + NULL, +}; +ATTRIBUTE_GROUPS(matrix_dev); + /* Only type 10 adapters (CEX4 and later) are supported * by the AP matrix device driver */ @@ -68,6 +80,7 @@ static struct device_driver matrix_driver = { .name = "vfio_ap", .bus = &matrix_bus, .suppress_bind_attrs = true, + .dev_groups = matrix_dev_groups, }; static int vfio_ap_matrix_dev_create(void) |
