From: Neo Jia <cjia@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "Ruan, Shuai" <shuai.ruan@intel.com>,
"Song, Jike" <jike.song@intel.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Kirti Wankhede <kwankhede@nvidia.com>,
qemu-devel <qemu-devel@nongnu.org>,
Alex Williamson <alex.williamson@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
"Lv, Zhiyuan" <zhiyuan.lv@intel.com>
Subject: Re: [Qemu-devel] [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU.
Date: Mon, 15 Feb 2016 23:36:47 -0800 [thread overview]
Message-ID: <20160216073647.GB6867@nvidia.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D15F7B3633@SHSMSX101.ccr.corp.intel.com>
On Tue, Feb 16, 2016 at 07:27:09AM +0000, Tian, Kevin wrote:
> > From: Neo Jia [mailto:cjia@nvidia.com]
> > Sent: Tuesday, February 16, 2016 3:13 PM
> >
> > On Tue, Feb 16, 2016 at 06:49:30AM +0000, Tian, Kevin wrote:
> > > > From: Alex Williamson [mailto:alex.williamson@redhat.com]
> > > > Sent: Thursday, February 04, 2016 3:33 AM
> > > >
> > > > On Wed, 2016-02-03 at 09:28 +0100, Gerd Hoffmann wrote:
> > > > > Hi,
> > > > >
> > > > > > Actually I have a long puzzle in this area. Definitely libvirt will use UUID to
> > > > > > mark a VM. And obviously UUID is not recorded within KVM. Then how does
> > > > > > libvirt talk to KVM based on UUID? It could be a good reference to this design.
> > > > >
> > > > > libvirt keeps track which qemu instance belongs to which vm.
> > > > > qemu also gets started with "-uuid ...", so one can query qemu via
> > > > > monitor ("info uuid") to figure what the uuid is. It is also in the
> > > > > smbios tables so the guest can see it in the system information table.
> > > > >
> > > > > The uuid is not visible to the kernel though, the kvm kernel driver
> > > > > doesn't know what the uuid is (and neither does vfio). qemu uses file
> > > > > handles to talk to both kvm and vfio. qemu notifies both kvm and vfio
> > > > > about anything relevant events (guest address space changes etc) and
> > > > > connects file descriptors (eventfd -> irqfd).
> > > >
> > > > I think the original link to using a VM UUID for the vGPU comes from
> > > > NVIDIA having a userspace component which might get launched from a udev
> > > > event as the vGPU is created or the set of vGPUs within that UUID is
> > > > started. Using the VM UUID then gives them a way to associate that
> > > > userspace process with a VM instance. Maybe it could register with
> > > > libvirt for some sort of service provided for the VM, I don't know.
> > >
> > > Intel doesn't have this requirement. It should be enough as long as
> > > libvirt maintains which sysfs vgpu node is associated to a VM UUID.
> > >
> > > >
> > > > > qemu needs a sysfs node as handle to the vfio device, something
> > > > > like /sys/devices/virtual/vgpu/<name>. <name> can be a uuid if you want
> > > > > have it that way, but it could be pretty much anything. The sysfs node
> > > > > will probably show up as-is in the libvirt xml when assign a vgpu to a
> > > > > vm. So the name should be something stable (i.e. when using a uuid as
> > > > > name you should better not generate a new one on each boot).
> > > >
> > > > Actually I don't think there's really a persistent naming issue, that's
> > > > probably where we diverge from the SR-IOV model. SR-IOV cannot
> > > > dynamically add a new VF, it needs to reset the number of VFs to zero,
> > > > then re-allocate all of them up to the new desired count. That has some
> > > > obvious implications. I think with both vendors here, we can
> > > > dynamically allocate new vGPUs, so I would expect that libvirt would
> > > > create each vGPU instance as it's needed. None would be created by
> > > > default without user interaction.
> > > >
> > > > Personally I think using a UUID makes sense, but it needs to be
> > > > userspace policy whether that UUID has any implicit meaning like
> > > > matching the VM UUID. Having an index within a UUID bothers me a bit,
> > > > but it doesn't seem like too much of a concession to enable the use case
> > > > that NVIDIA is trying to achieve. Thanks,
> > > >
> > >
> > > I would prefer to making UUID an optional parameter, while not tieing
> > > sysfs vgpu naming to UUID. This would be more flexible to different
> > > scenarios where UUID might not be required.
> >
> > Hi Kevin,
> >
> > Happy Chinese New Year!
> >
> > I think having UUID as the vgpu device name will allow us to have an gpu vendor
> > agnostic solution for the upper layer software stack such as QEMU, who is
> > supposed to open the device.
> >
>
> Qemu can use whatever sysfs path provided to open the device, regardless
> of whether there is an UUID within the path...
>
Hi Kevin,
Then it will provide even more benefit of using UUID as libvirt can be
implemented as gpu vendor agnostic, right? :-)
The UUID can be VM UUID or vGPU group object UUID which really depends on the
high level software stack, again the benefit is gpu vendor agnostic.
Thanks,
Neo
> Thanks
> Kevin
next prev parent reply other threads:[~2016-02-16 7:36 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <56AFD231.3010404@nvidia.com>
2016-02-02 1:48 ` [Qemu-devel] [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU Kirti Wankhede
2016-02-02 7:42 ` Tian, Kevin
2016-02-02 8:00 ` Gerd Hoffmann
2016-02-02 8:13 ` Neo Jia
2016-02-02 8:18 ` Tian, Kevin
2016-02-02 8:31 ` Neo Jia
2016-02-02 17:11 ` Alex Williamson
2016-02-03 5:41 ` Tian, Kevin
2016-02-03 8:28 ` Gerd Hoffmann
2016-02-03 19:32 ` Alex Williamson
2016-02-16 6:49 ` Tian, Kevin
2016-02-16 7:13 ` Neo Jia
2016-02-16 7:27 ` Tian, Kevin
2016-02-16 7:36 ` Neo Jia [this message]
2016-02-16 7:40 ` Tian, Kevin
2016-02-16 7:53 ` Neo Jia
2016-02-16 8:10 ` Tian, Kevin
2016-02-16 8:48 ` Neo Jia
2016-02-17 3:31 ` Tian, Kevin
2016-02-17 4:17 ` Neo Jia
2016-02-17 5:04 ` Tian, Kevin
2016-02-17 5:09 ` Eric Blake
2016-02-17 5:40 ` Neo Jia
2016-02-17 5:37 ` Neo Jia
2016-02-17 6:02 ` Tian, Kevin
2016-02-17 7:26 ` Neo Jia
2016-02-17 7:46 ` Tian, Kevin
2016-02-17 7:54 ` Neo Jia
2016-02-17 8:57 ` Tian, Kevin
2016-02-17 9:34 ` Neo Jia
2016-02-17 9:52 ` Tian, Kevin
2016-02-17 10:34 ` Neo Jia
2016-02-17 10:47 ` Tian, Kevin
2016-02-17 13:08 ` Gerd Hoffmann
2016-02-17 15:36 ` Neo Jia
2016-02-17 6:52 ` Gerd Hoffmann
2016-02-17 7:32 ` Neo Jia
2016-02-17 7:51 ` Tian, Kevin
2016-02-17 8:41 ` Neo Jia
2016-02-17 9:01 ` Tian, Kevin
2016-02-02 8:29 ` Gerd Hoffmann
2016-02-02 9:25 ` Kirti Wankhede
2016-02-03 5:56 ` Tian, Kevin
2016-02-03 13:21 ` Kirti Wankhede
2016-02-04 3:08 ` Tian, Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160216073647.GB6867@nvidia.com \
--to=cjia@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=jike.song@intel.com \
--cc=kevin.tian@intel.com \
--cc=kraxel@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kwankhede@nvidia.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=shuai.ruan@intel.com \
--cc=zhiyuan.lv@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).