On Mon, May 19, 2014 at 03:50:31PM +0200, Gerd Hoffmann wrote: > Hi, > > > > Yes, -vga, -net nic, -drive if=scsi (maybe more) can internally create > > > pci devices > > > with auto slot assignment, which will occupy slot 2 indeed. > > > Use -device instead to create the devices. > > > > > > > Are you saying we have to create the devices explicitly when we want > > to work IGD vga with passthrough? But how to make sure all user know > > this workable way? Maybe you suggest we should document somewhere. > > libvirt does this unconditionally, because it is a good idea anyway for > a number of reasons. Example: create a machine with three pci devices, > hot-unplug the second, then live-migrate to another machine. The only > way to create the correct config on the target machine is to explicitly > assign slots, otherwise the third pci device ends up in the wrong slot. > > Don't know how the libxl (and xl tool) work. Maybe it does the same > anyway. Maybe it can handle the address assignment transparently for > the user.
I'm not sure if libxl itself takes care of this under the hood, but the libvirt libxl driver at least does not deal with persistent PCI address allocation currently. We're pulling the QEMU driver PCI address allocation code out into a shared module, for reuse by libvirt's BHyve driver for BSD, which will make it easy for the libvirt libxl driver to also use it if required too. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|