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: Tue, 16 Feb 2016 23:54:48 -0800 Message-ID: <20160217075448.GC9416@nvidia.com> References: <20160216075310.GC6867@nvidia.com> <20160216084855.GA7717@nvidia.com> <20160217041743.GA7903@nvidia.com> <20160217053742.GA8839@nvidia.com> <20160217072610.GA9416@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: "Ruan, Shuai" , "Song, Jike" , "kvm@vger.kernel.org" , Kirti Wankhede , qemu-devel , Alex Williamson , Gerd Hoffmann , Paolo Bonzini , "Lv, Zhiyuan" To: "Tian, Kevin" Return-path: Received: from hqemgate15.nvidia.com ([216.228.121.64]:18568 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754360AbcBQHyv (ORCPT ); Wed, 17 Feb 2016 02:54:51 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Feb 17, 2016 at 07:46:15AM +0000, Tian, Kevin wrote: > > From: Neo Jia > > Sent: Wednesday, February 17, 2016 3:26 PM > > > > > > > > > If your most concern is having this kind of path doesn't provide enough > > information of the virtual device, we can add more sysfs attributes within the > > directory of /sys/devices/virtual/vgpu/$UUID-$vgpu_idx/ to reflect the > > information you want. > > Like Gerd said, you can have something like this: > > -device vfio-pci,sysfsdev=/sys/devices/virtual/vgpu/vgpu_idx/UUID Hi Kevin, The vgpu_idx is not unique number at all. For example, how to locate the path of a given VM? 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. This is not required if you have UUID as part of the device path. > > > > > Even with UUID, you don't need libvirt at all. you can get uuid by running > > uuidgen command, I don't need libvirt to code up and test the RFC that I have > > sent out early. :-) > > although simple, it still creates unnecessary user space dependency for > kernel resource management... 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, it just make sure that virtual gpu device directory can be uniquely addressed. Thanks, Neo > > Thanks > Kevin