[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <0e8bac2b-31a0-a1de-c6cf-e824cd256af6@linux.ibm.com>
Date: Wed, 12 Sep 2018 13:01:08 -0400
From: Tony Krowiak <akrowiak@...ux.ibm.com>
To: Cornelia Huck <cohuck@...hat.com>,
Tony Krowiak <akrowiak@...ux.vnet.ibm.com>
Cc: linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, freude@...ibm.com, schwidefsky@...ibm.com,
heiko.carstens@...ibm.com, borntraeger@...ibm.com,
kwankhede@...dia.com, bjsdjshi@...ux.vnet.ibm.com,
pbonzini@...hat.com, alex.williamson@...hat.com,
pmorel@...ux.vnet.ibm.com, alifm@...ux.vnet.ibm.com,
mjrosato@...ux.vnet.ibm.com, jjherne@...ux.vnet.ibm.com,
thuth@...hat.com, pasic@...ux.vnet.ibm.com, berrange@...hat.com,
fiuczy@...ux.vnet.ibm.com, buendgen@...ibm.com,
frankja@...ux.ibm.com
Subject: Re: [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
domain_mask
To assign a device, either a bitmask or a comma separated list of IDs
prepended
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 <akrowiak@...ux.ibm.com>
>> Reviewed-by: Halil Pasic <pasic@...ux.ibm.com>
>> Tested-by: Michael Mueller <mimu@...ux.ibm.com>
>> Tested-by: Farhan Ali <alifm@...ux.ibm.com>
>> Tested-by: Pierre Morel <pmorel@...ux.ibm.com>
>> Signed-off-by: Christian Borntraeger <borntraeger@...ibm.com>
>> ---
>> drivers/s390/crypto/vfio_ap_ops.c | 52 +++++++++++++++++++++++++++++++++++++
>> 1 files changed, 52 insertions(+), 0 deletions(-)
Powered by blists - more mailing lists