From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neo Jia Subject: Re: [Qemu-devel] [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU. Date: Wed, 17 Feb 2016 07:36:59 -0800 Message-ID: <20160217153659.GC11166@nvidia.com> References: <20160216084855.GA7717@nvidia.com> <20160217041743.GA7903@nvidia.com> <20160217053742.GA8839@nvidia.com> <20160217072610.GA9416@nvidia.com> <20160217075448.GC9416@nvidia.com> <1455714498.9127.28.camel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: "Tian, Kevin" , "Ruan, Shuai" , "Song, Jike" , "kvm@vger.kernel.org" , Kirti Wankhede , qemu-devel , Alex Williamson , Paolo Bonzini , "Lv, Zhiyuan" To: Gerd Hoffmann Return-path: Received: from hqemgate16.nvidia.com ([216.228.121.65]:13088 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422745AbcBQPhC (ORCPT ); Wed, 17 Feb 2016 10:37:02 -0500 Content-Disposition: inline In-Reply-To: <1455714498.9127.28.camel@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Feb 17, 2016 at 02:08:18PM +0100, Gerd Hoffmann wrote: > Hi, > > > For example, how to locate the path of a given VM? > > You go ask libvirt, the domain xml will have the info. > > > Whoever is going to configure > > the qemu has to walk through *all* the current vgpu path to locate the UUID to > > match the QEMU's VM UUID. > > No. qemu simply uses the path it get passed from libvirt. libvirt > simply uses whatever is stored in the domain xml. > > i.e. you'll have a config like this: > > > rhel7-vfio > 0990b05d-4fbd-49bf-88e4-e87974c64fba > [ ... ] > > [ ... ] > > >
> >
bus='0x00' slot='0x04' function='0x0'/> > > > > I think I has answered this, UUID is not a user space or kernel space > > concept, it is just a generic way to represent object, > > Yes. But the above sounds like you want to use UUIDs to *link* two > objects, by assigning the same uuid to both vm and vgpu. This is *not* > how uuids should be used. Each object should have its own uuid. > > You can use uuids to name the vgpus if you want of course. But the vgpu > uuid will will have no relationship whatsoever to the vm uuid then. > Agree. I should made it clear that it should be a separate object. Thanks, Neo > cheers, > Gerd > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aW4A6-0001y6-0R for qemu-devel@nongnu.org; Wed, 17 Feb 2016 10:37:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aW4A2-0001uD-Qd for qemu-devel@nongnu.org; Wed, 17 Feb 2016 10:37:05 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:13093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aW4A2-0001u7-In for qemu-devel@nongnu.org; Wed, 17 Feb 2016 10:37:02 -0500 Date: Wed, 17 Feb 2016 07:36:59 -0800 From: Neo Jia Message-ID: <20160217153659.GC11166@nvidia.com> References: <20160216084855.GA7717@nvidia.com> <20160217041743.GA7903@nvidia.com> <20160217053742.GA8839@nvidia.com> <20160217072610.GA9416@nvidia.com> <20160217075448.GC9416@nvidia.com> <1455714498.9127.28.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1455714498.9127.28.camel@redhat.com> Subject: Re: [Qemu-devel] [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: "Ruan, Shuai" , "Tian, Kevin" , Alex Williamson , "kvm@vger.kernel.org" , qemu-devel , "Song, Jike" , Kirti Wankhede , "Lv, Zhiyuan" , Paolo Bonzini On Wed, Feb 17, 2016 at 02:08:18PM +0100, Gerd Hoffmann wrote: > Hi, > > > For example, how to locate the path of a given VM? > > You go ask libvirt, the domain xml will have the info. > > > Whoever is going to configure > > the qemu has to walk through *all* the current vgpu path to locate the UUID to > > match the QEMU's VM UUID. > > No. qemu simply uses the path it get passed from libvirt. libvirt > simply uses whatever is stored in the domain xml. > > i.e. you'll have a config like this: > > > rhel7-vfio > 0990b05d-4fbd-49bf-88e4-e87974c64fba > [ ... ] > > [ ... ] > > >
> >
bus='0x00' slot='0x04' function='0x0'/> > > > > I think I has answered this, UUID is not a user space or kernel space > > concept, it is just a generic way to represent object, > > Yes. But the above sounds like you want to use UUIDs to *link* two > objects, by assigning the same uuid to both vm and vgpu. This is *not* > how uuids should be used. Each object should have its own uuid. > > You can use uuids to name the vgpus if you want of course. But the vgpu > uuid will will have no relationship whatsoever to the vm uuid then. > Agree. I should made it clear that it should be a separate object. Thanks, Neo > cheers, > Gerd >