[openstack-dev] Instance with access to GPU, libvirt and hostdev

Guillaume Thouvenin guillaume.thouvenin at bull.net
Wed Apr 10 09:22:23 UTC 2013

On 10/04/2013 11:00, Daniel P. Berrange wrote:

>> I don't believe this would work without IOMMU support.
> Correct, libvirt will refuse to let you assign any devices to a
> guest, unless it can be done safely, which means you need
> an IOMMU.

OK so I think that I misunderstood something. Currently IOMMU is not 
working on my machine. But I can allow the access to a pci device to my 
container by doing:

     <hostdev mode='capabilities' type='misc'>

I do the same for /dev/tty and /dev/nvidiactl and inside my guest I can 
start an X server and use virtualGL for 3D rendering.

I start the guest with "virsh -c lxc:// start lxcvm". So I though that 
libvirt assign the device to the guest without IOMMU but I think I'm 
missing something. I suspect that I'm just allowing the guest to access 
to the device and I'm not really assigning the device to the guest here.

I think that this solution can be interesting to just start an instance 
with some graphics capabilities and it is different from PCI 
passthrough. So maybe it doesn't fit with the bp "Add support for PCI 
passthrough and SR-IOV".


Guillaume Thouvenin                  Software Engineer
Bull, Architect of an Open World     http://www.bull.com
Phone: + 33 4 76 29 75 36

More information about the OpenStack-dev mailing list