Re: [PATCH v5 10/13] s390: vfio-ap: sysfs interface to view matrix mdev matrix

Halil Pasic
2018-06-07T13:16:22Z

On 06/07/2018 02:53 PM, Tony Krowiak wrote:
>>>> 2) As I said above, what you show is not the effective mask used by the guest
>>>
>>> Why would a sysfs attribute for the mediated matrix device show the effective
>>> mask used by the guest?
>>
>> OK, bad word, "effective", replace with "really".
>>
>> We do not implement any kind of provisioning nor do we implement update
>> of the CRYCB at any point after the first mediated device open.
>
> I think this is a way we might be able to hot plug/unplug devices.
>
>>
>>
>> Binding a queue and updating the mask can be done at any time (may be we should change this ?)
>
> As I said above, I think we can utilize this as a means of hot plugging/unplugging AP
> adapters and domains. If the guest is running when an adapter or domain is assigned,
> we can update the guest's CRYCB at that time.
>
>>
>>
>> What is the point of showing a matrix which will never be used by the guest?
>
> That is simply not true. The matrix WILL be used by a guest the next time a
> guest is configured with a vfio-ap device referencing the path to the
> mediated matrix device - i.e., -device vfio-ap,sysfsdev=$PATH. The point
> is to show the matrix assigned to the mediated matrix device. In my mind, the
> mediated matrix device is a separate object from the guest. Sure it is used
> to configure a guest's matrix when the guest is started, but it could be used
> to configure the matrix for any guest; it has no direct connection to a
> particular guest until a guest using the device is started. IMHO the sysfs
> attributes for the mediated matrix device reflect only the attributes of
> the device, not the attributes of a guest.

So bottom line is what? Is the interface going to change so that modifications
to the mdev's matrix will be reflected immediately -- to support hotplug of
domains and ap cards?

Or are you intending to keep the interface as is?

If the matrix assigned to the mediated device can differ from the matrix
of the guest (that is the masks in the CRYCB, and I'm talking about a running
guest) do you provide a way for the host admin to examine the matrix of the
guest? If not, why do you think that information is irrelevant to the host
admin?

Regards,
Halil