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

From: Halil Pasic
Date: Thu Jun 07 2018 - 09:19:15 EST




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