If your Dom0 XenLinux kernel is built with pciback as a module, attempting to use the kernel command-line parameter pciback.hide won't work (my current impression is that this applies even if pciback is preloaded in an initrd). This means that if you wish to assign hardware to a DomU that is started automatically at boot time, you need to use another method.
There are two possibilities.
use late binding as described in section 5.3.1.3 of the user manual and put something like (i) or (ii) in an init script (/etc/rc.local will work on Fedora) to be executed before xendomains:
Bind a device to the PCI Backend which is not bound to any other driver. (You can find the correct value for $SLOT using lspci)
SLOT=0000:01:04.d # Add a new slot to the PCI Backend's list echo -n $SLOT > /sys/bus/pci/drivers/pciback/new_slot # Now that the backend is watching for the slot, bind to it echo -n $SLOT > /sys/bus/pci/drivers/pciback/bind
- Unbind a device from its driver and bind to the PCI Backend.
SLOT=0000:05:02.0 # Unbind a PCI network card from its network driver echo -n $SLOT > /sys/bus/pci/drivers/3c905/unbind # And now bind it to the PCI Backend echo -n $SLOT > /sys/bus/pci/drivers/pciback/new_slot echo -n $SLOT > /sys/bus/pci/drivers/pciback/bind
This has the disadvantage that if pciback is unloaded for any reason, you'll have to do it again.
- Add a line to /etc/modprobe.conf to pass the hide parameter to pciback
# hide (0000:05:02.0) options pciback hide=(0000:05:02.0)
On its own, that will only work if no driver is loaded for the card before pciback (it won't unbind a driver that's already bound to it), so it's necessary to make sure that pciback is loaded before any such driver. Supposing that the usual driver for the card is skge, we can make that happen by adding a line like this:install skge /sbin/modprobe pciback ; /sbin/modprobe --first-time --ignore-install skge
which says that whenever skge is asked to be loaded, pciback should be loaded first.
Note that to make use of this, a Linux kernel running in the guest domain has to have been compiled with pci frontend support. Look under "bus options (PCI etc)" for Xen PCI Frontend in the kernel configuration. At time of writing, the Fedora kernel-xen rpm for x86_64 2.6.17-1.2157_FC5.x86_64.rpm is compiled with it off.
