From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [Qemu-devel] [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU. Date: Wed, 17 Feb 2016 14:08:18 +0100 Message-ID: <1455714498.9127.28.camel@redhat.com> References: <20160216075310.GC6867@nvidia.com> <20160216084855.GA7717@nvidia.com> <20160217041743.GA7903@nvidia.com> <20160217053742.GA8839@nvidia.com> <20160217072610.GA9416@nvidia.com> <20160217075448.GC9416@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Cc: "Tian, Kevin" , "Ruan, Shuai" , "Song, Jike" , "kvm@vger.kernel.org" , Kirti Wankhede , qemu-devel , Alex Williamson , Paolo Bonzini , "Lv, Zhiyuan" To: Neo Jia Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46606 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964898AbcBQNIU convert rfc822-to-8bit (ORCPT ); Wed, 17 Feb 2016 08:08:20 -0500 In-Reply-To: <20160217075448.GC9416@nvidia.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 [ ... ] [ ... ]
> 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. cheers, Gerd