Re: [RFC PATCH v1 1/1] vGPU core driver : to provide common interface for vGPU.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  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).

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).

cheers,
  Gerd

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux