From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kirti Wankhede Subject: Re: [Qemu-devel] [PATCH v7 0/4] Add Mediated device support Date: Fri, 9 Sep 2016 00:18:10 +0530 Message-ID: <663357f9-9a42-ec37-781a-86a69ce52a51@nvidia.com> References: <1472097235-6332-1-git-send-email-kwankhede@nvidia.com> <20160830101638.49df467d@t450s.home> <78fedd65-6d62-e849-ff3b-d5105b2da816@redhat.com> <20160901105948.62f750aa@t450s.home> <98bbdbbf-c388-9120-3306-64f0cfb820a7@nvidia.com> <8682faeb-0331-f014-c13e-03c20f3f2bdf@redhat.com> <2a195ed1-f6aa-ffab-3f5c-4121de264d05@redhat.com> <20160906114030.3c9a0162@t450s.home> <3f35c9e0-859e-0175-4362-8674a0acb857@nvidia.com> <20160906152858.040e557d@t450s.home> <9276a8a9-02dd-57dd-ba19-cbac5a0d6f3a@nvidia.com> <20160907104456.0e8d0477@t450s.home> <4acb3eac-1e75-6b42-a70d-bb9a14fc7654@nvidia.com> <20160907161357.6eb8b8d3@t450s.home> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Cc: Paolo Bonzini , Michal Privoznik , "Song, Jike" , "cjia@nvidia.com" , "kvm@vger.kernel.org" , "libvir-list@redhat.com" , "Tian, Kevin" , "qemu-devel@nongnu.org" , "kraxel@redhat.com" , Laine Stump , "bjsdjshi@linux.vnet.ibm.com" To: Alex Williamson Return-path: Received: from hqemgate14.nvidia.com ([216.228.121.143]:1996 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758559AbcIHSsj (ORCPT ); Thu, 8 Sep 2016 14:48:39 -0400 In-Reply-To: <20160907161357.6eb8b8d3@t450s.home> Sender: kvm-owner@vger.kernel.org List-ID: On 9/8/2016 3:43 AM, Alex Williamson wrote: > On Wed, 7 Sep 2016 23:36:28 +0530 > Kirti Wankhede wrote: > >> On 9/7/2016 10:14 PM, Alex Williamson wrote: >>> On Wed, 7 Sep 2016 21:45:31 +0530 >>> Kirti Wankhede wrote: >>> >>>> On 9/7/2016 2:58 AM, Alex Williamson wrote: >>>>> On Wed, 7 Sep 2016 01:05:11 +0530 >>>>> Kirti Wankhede wrote: >>>>> >>>>>> On 9/6/2016 11:10 PM, Alex Williamson wrote: >>>>>>> On Sat, 3 Sep 2016 22:04:56 +0530 >>>>>>> Kirti Wankhede wrote: >>>>>>> >>>>>>>> On 9/3/2016 3:18 AM, Paolo Bonzini wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>> On 02/09/2016 20:33, Kirti Wankhede wrote: ... > > Philosophically, mdev devices should be entirely independent of one > another. A user can set the same iommu context for multiple mdevs > by placing them in the same container. A user should be able to > stop using an mdev in one place and start using it somewhere else. > It should be a fungible $TYPE device. It's an NVIDIA-only requirement > that imposes this association of mdev devices into groups and I don't > particularly see it as beneficial to the mdev architecture. So why > make it a standard part of the interface? > Yes, I agree. This might not be each vendor's requirement. > We could do keying at the layer you suggest, assuming we can find > something that doesn't restrict the user, but we could make that > optional. We can key on 'container'. Devices should be in same VFIO 'container'. open() call should fail if they are found to be in different containers. > For instance, say we did key on pid, there could be an > attribute in the supported types hierarchy to indicate this type > supports(requires) pid-sets. Each mdev device with this attribute > would create a pid-group file in sysfs where libvirt could associate > the device. Only for those mdev devices requiring it. > We are OK with this suggestion if this works of libvirt integration. We can have file in types directory in supported types as 'requires_group'. Thanks, Kirti > The alternative is that we need to find some mechanism for this > association that doesn't impose arbitrary requirements, and potentially > usage restrictions on vendors that don't have this need. Thanks, > > Alex >