[lkml]   [2018]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v9 13/22] s390: vfio-ap: sysfs interface to view matrix mdev matrix
On 08/20/2018 10:08 AM, Cornelia Huck wrote:
> I find this output to be a bit confusing; but OTOH, I'm probably not
> the person to parse it :) Still, some comments.
> From previous discussions, ISTR that this is mainly supposed to be a
> debugging/administration aid. Of course, this generates some questions:
> - Should this be in sysfs (sysfs attributes are supposed to follow the
> "one value per file" rule, at least for the most part), or would
> debugfs be a better fit?
> - Should userspace code be able to introspect the current
> configuration? If yes, it might be better to have some
> not-so-nice-but-easily-parsable output, possibly one attribute for
> the assigned adapters and one for the assigned domains, and a tool
> which distills that into a nice "matrix" with labeled rows and
> columns for human consumption.
> That said, I don't really have major objections to that interface.

For now, I will leave it in, but we could conceivably simplify configuration
of the matrix and adhere to sysfs rules by modeling this after the AP bus
apmask and aqmask sysfs interfaces. If we did that, there would need to
be only
three RW sysfs interfaces:

apm or apmask or ap_mask or adapter_mask or apid_mask
aqm or aqmask or aq_mask or domains or usage_domain_mask or apqi_mask
adm or admask or ad_mask or control_domains or control_domain_mask or

To assign a device, either a bitmask or a comma separated list of IDs
with a '+' could be passed in. To unassign a device, either a bitmask in
or a
comma-separated list of IDs prepended with a '-' could be passed in.

Reading an attribute would return the mask. As you suggested, tools could be
provided to parse the output and display it in a human-readable format.

>> Signed-off-by: Tony Krowiak <>
>> Reviewed-by: Halil Pasic <>
>> Tested-by: Michael Mueller <>
>> Tested-by: Farhan Ali <>
>> Tested-by: Pierre Morel <>
>> Signed-off-by: Christian Borntraeger <>
>> ---
>> drivers/s390/crypto/vfio_ap_ops.c | 52 +++++++++++++++++++++++++++++++++++++
>> 1 files changed, 52 insertions(+), 0 deletions(-)

 \ /
  Last update: 2018-09-12 19:02    [W:0.179 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site