From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Ferlan Subject: Re: [libvirt] [Qemu-devel] [PATCH v7 0/4] Add Mediated device support Date: Sat, 3 Sep 2016 07:56:49 -0400 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "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: Paolo Bonzini , Kirti Wankhede , Michal Privoznik , Alex Williamson Return-path: Received: from mx1.redhat.com ([209.132.183.28]:52044 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751465AbcICL4w (ORCPT ); Sat, 3 Sep 2016 07:56:52 -0400 In-Reply-To: <2a195ed1-f6aa-ffab-3f5c-4121de264d05@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09/02/2016 05:48 PM, Paolo Bonzini wrote: > > > On 02/09/2016 20:33, Kirti Wankhede wrote: >> We could even do: >>>> >>>> echo $UUID1:$GROUPA > create >>>> >>>> where $GROUPA is the group ID of a previously created mdev device into >>>> which $UUID1 is to be created and added to the same group. >> > >>>From the point of view of libvirt, I think I prefer Alex's idea. > could be an additional element in the nodedev-create XML: > > > my-vgpu > pci_0000_86_00_0 > > > 0695d332-7831-493f-9e71-1c85c8911a08 > group1 > > > > (should group also be a UUID?) As long as create_group handles all the work and all libvirt does is call it, get the return status/error, and handle deleting the vGPU on error, then I guess it's doable. Alternatively having multiple in the XML and performing a single *mdev/create_group is an option. I suppose it all depends on the arguments to create_group and the expected output and how that's expected to be used. That is, what is the "output" from create_group that gets added to the domain XML? How is that found? Also, once the domain is running can a vGPU be added to the group? Removed? What allows/prevents? > > Since John brought up the topic of minimal XML, in this case it will be > like this: > > > my-vgpu > pci_0000_86_00_0 > > > > > > The uuid will be autogenerated by libvirt and if there's no (as > is common for VMs with only 1 vGPU) it will be a single-device group. > The could be ignored as it seems existing libvirt code wants to generate a name via udevGenerateDeviceName for other devices. I haven't studied it long enough, but I believe that's how those pci_####* names created. John From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bg9ZC-0002GG-GE for qemu-devel@nongnu.org; Sat, 03 Sep 2016 07:56:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bg9Z8-00083T-Dy for qemu-devel@nongnu.org; Sat, 03 Sep 2016 07:56:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bg9Z8-00083M-5o for qemu-devel@nongnu.org; Sat, 03 Sep 2016 07:56:54 -0400 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> From: John Ferlan Message-ID: Date: Sat, 3 Sep 2016 07:56:49 -0400 MIME-Version: 1.0 In-Reply-To: <2a195ed1-f6aa-ffab-3f5c-4121de264d05@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [libvirt] [PATCH v7 0/4] Add Mediated device support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Kirti Wankhede , Michal Privoznik , Alex Williamson Cc: "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" On 09/02/2016 05:48 PM, Paolo Bonzini wrote: > > > On 02/09/2016 20:33, Kirti Wankhede wrote: >> We could even do: >>>> >>>> echo $UUID1:$GROUPA > create >>>> >>>> where $GROUPA is the group ID of a previously created mdev device into >>>> which $UUID1 is to be created and added to the same group. >> > >>>From the point of view of libvirt, I think I prefer Alex's idea. > could be an additional element in the nodedev-create XML: > > > my-vgpu > pci_0000_86_00_0 > > > 0695d332-7831-493f-9e71-1c85c8911a08 > group1 > > > > (should group also be a UUID?) As long as create_group handles all the work and all libvirt does is call it, get the return status/error, and handle deleting the vGPU on error, then I guess it's doable. Alternatively having multiple in the XML and performing a single *mdev/create_group is an option. I suppose it all depends on the arguments to create_group and the expected output and how that's expected to be used. That is, what is the "output" from create_group that gets added to the domain XML? How is that found? Also, once the domain is running can a vGPU be added to the group? Removed? What allows/prevents? > > Since John brought up the topic of minimal XML, in this case it will be > like this: > > > my-vgpu > pci_0000_86_00_0 > > > > > > The uuid will be autogenerated by libvirt and if there's no (as > is common for VMs with only 1 vGPU) it will be a single-device group. > The could be ignored as it seems existing libvirt code wants to generate a name via udevGenerateDeviceName for other devices. I haven't studied it long enough, but I believe that's how those pci_####* names created. John