From: Zhenyu Wang Subject: Re: [libvirt] [PATCH v2 4/4] Documentation/vfio-mediated-device.txt: update for aggregation attribute Date: Fri, 27 Jul 2018 10:16:58 +0800 Message-ID: <20180727021658.GN1267@zhen-hp.sh.intel.com> References: <20180620074039.10539-1-zhenyuw@linux.intel.com> <20180720021928.15343-1-zhenyuw@linux.intel.com> <20180720021928.15343-5-zhenyuw@linux.intel.com> <20180726174640.581f62bc.cohuck@redhat.com> Reply-To: Zhenyu Wang Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8918894145647697238==" Cc: kevin.tian@intel.com, kvm@vger.kernel.org, libvirt-list@redhat.com, kwankhede@nvidia.com, intel-gvt-dev@lists.freedesktop.org To: Cornelia Huck Return-path: In-Reply-To: <20180726174640.581f62bc.cohuck@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com List-Id: kvm.vger.kernel.org --===============8918894145647697238== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="l8HeubOa6/3yq29t" Content-Disposition: inline --l8HeubOa6/3yq29t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2018.07.26 17:46:40 +0200, Cornelia Huck wrote: > On Fri, 20 Jul 2018 10:19:28 +0800 > Zhenyu Wang wrote: >=20 > > Update mdev doc on new aggregration attribute and instances attribute > > for mdev. > >=20 > > Cc: Kirti Wankhede > > Cc: Alex Williamson > > Cc: Kevin Tian > > Signed-off-by: Zhenyu Wang > > --- > > Documentation/vfio-mediated-device.txt | 39 ++++++++++++++++++++++---- > > 1 file changed, 33 insertions(+), 6 deletions(-) > >=20 > > diff --git a/Documentation/vfio-mediated-device.txt b/Documentation/vfi= o-mediated-device.txt > > index c3f69bcaf96e..9ec9495dcbe7 100644 > > --- a/Documentation/vfio-mediated-device.txt > > +++ b/Documentation/vfio-mediated-device.txt > > @@ -211,12 +211,20 @@ Directories and files under the sysfs for Each Ph= ysical Device > > | | |--- description > > | | |--- [devices] > > | |--- [] > > - | |--- create > > - | |--- name > > - | |--- available_instances > > - | |--- device_api > > - | |--- description > > - | |--- [devices] > > + | | |--- create > > + | | |--- name > > + | | |--- available_instances > > + | | |--- device_api > > + | | |--- description > > + | | |--- [devices] > > + | |--- [] > > + | | |--- create > > + | | |--- name > > + | | |--- available_instances > > + | | |--- device_api > > + | | |--- description > > + | | |--- > > + | | |--- [devices] > > =20 > > * [mdev_supported_types] > > =20 > > @@ -260,6 +268,19 @@ Directories and files under the sysfs for Each Phy= sical Device > > This attribute should show brief features/description of the type. T= his is > > optional attribute. > > =20 > > +* > > + > > + The description is to show feature for one instance of the type. >=20 > You are talking about "one instance" here. Can this be different for > the same type with different physical devices? > I would expect for normal mdev types, driver might expose like x2, x4, x8 t= ypes which split hw resource equally. But for type with aggregation feature, it = can set user wanted number of instances. Sorry maybe my use of word was not cle= ar, how about "one example of type"? > > + is an optional attributes to show that []'s instances can be > > + aggregated to be assigned for one mdev device. Set number of instanc= es by > > + appending "instances=3DN" parameter for create. Instances number can= 't exceed > > + available_instances number. Without "instances=3DN" parameter will b= e default > > + one instance to create. >=20 > Could there be a case where available_instances is n, but aggregation > is only supported for a value m < n? If yes, should m be discoverable > via the "aggregation" attribute? > I don't think there could be a case for that. As for aggregation type, it represents minimal resource allocated for a singleton, I can't see any reason for possible m < n. Thanks. > > + > > +Example:: > > + > > + # echo ",instances=3DN" > create > > + > > Directories and Files Under the sysfs for Each mdev Device > > ---------------------------------------------------------- > > =20 > > @@ -268,6 +289,7 @@ Directories and Files Under the sysfs for Each mdev= Device > > |- [parent phy device] > > |--- [$MDEV_UUID] > > |--- remove > > + |--- instances > > |--- mdev_type {link to its type} > > |--- vendor-specific-attributes [optional] > > =20 > > @@ -281,6 +303,11 @@ Example:: > > =20 > > # echo 1 > /sys/bus/mdev/devices/$mdev_UUID/remove > > =20 > > +* instances > > + > > +For aggregation type show number of instances assigned for this mdev. = For normal > > +type or default will just show one instance. > > + > > Mediated device Hot plug > > ------------------------ > > =20 >=20 --=20 Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 --l8HeubOa6/3yq29t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTXuabgHDW6LPt9CICxBBozTXgYJwUCW1qAmgAKCRCxBBozTXgY J1sgAJsGhGpz5uhlbe/qX73lKYxyPVew1ACdElC9qXpkCb1fsZDmaUdanZyuLYY= =o2JL -----END PGP SIGNATURE----- --l8HeubOa6/3yq29t-- --===============8918894145647697238== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============8918894145647697238==--