From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Subject: Re: [libvirt] [PATCH v2 0/4] New mdev type handling for aggregated resources Date: Thu, 26 Jul 2018 17:59:36 +0200 Message-ID: <20180726175936.41870a9e.cohuck@redhat.com> References: <20180620074039.10539-1-zhenyuw@linux.intel.com> <20180720021928.15343-1-zhenyuw@linux.intel.com> <20180724114440.76564e75@t450s.home> <20180726135028.GG11030@beluga.usersys.redhat.com> <20180726173007.3f2b9d09.cohuck@redhat.com> <20180726095126.37e1c341@t450s.home> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kevin.tian@intel.com, kvm@vger.kernel.org, Erik Skultety , libvirt-list@redhat.com, Zhenyu Wang , kwankhede@nvidia.com, intel-gvt-dev@lists.freedesktop.org To: Alex Williamson Return-path: In-Reply-To: <20180726095126.37e1c341@t450s.home> 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 On Thu, 26 Jul 2018 09:51:26 -0600 Alex Williamson wrote: > On Thu, 26 Jul 2018 17:30:07 +0200 > Cornelia Huck wrote: > > > On Thu, 26 Jul 2018 15:50:28 +0200 > > Erik Skultety wrote: > > > Since libvirt doesn't have an API to create mdevs yet, this doesn't pose an > > > issue for us at the moment. I see this adds new optional sysfs attributes which > > > we could expose within our device capabilities XML, provided it doesn't use a > > > free form text, like the description attribute does. > > > > One thing I noticed is that we have seem to have an optional (?) > > vendor-driver created "aggregation" attribute (which always prints > > "true" in the Intel driver). Would it be better or worse for libvirt if > > it contained some kind of upper boundary or so? > > Ultimately the aggregation value should be fully specified in > Documentation/ABI, but doesn't the kernel generally use 'Y' or 'N' for > boolean attributes in sysfs? Maybe mdev core can handle the attribute > since it should exist any time the create_with_instances callback is > provided. It might make sense to print a number if the driver allows a number of resources to be aggregated which is not the same as available_instances (see my reply to the documentation patch). > > > Additionally, would it > > be easier if the "create" attribute always accepted > > ",instances=1" (calling the .create ops in that case?) > > Unless I misunderstand the code or the question, I think this is > exactly what happens: Indeed, it does. Let me blame the weather ;) > If the mdev core supplied the aggregation attribute, then the presence > of the attribute could indicate to userspace whether it can always > provide an instance (aggregate) count, even if limited to '1' when 'N', > for that mdev type. Thanks, > > Alex