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

Re: [Xen-users] pci passthrough and usb add on card

On Mon, 2012-04-23 at 20:10 +0100, Christoph Kaminski wrote:
> I have a pci usb addon card and want to use it with pci passthrough. In 
> centos 3.2.x kernel are the usb modules compiled in into the kernel. If 
> I load the xen-pciback module with initramfs (build with dracut) then it 
> is to late, because the usb part of the kernel has "grabbed" it already. 
> How can I exclude a pci device for usb modules? I dont want to disable 
> completly usb support because I want to use the onboard usb controller 
> in dom0. Does someone know a solution for this problem? (except kernel 
> recompile with usb as module)

I think there is a command line option to hide pci devices from the
normal driver, but I'm not sure if it relies on pciback (or something
else) being built in. Google might help if you look for "xen pci hide"
or something.

Otherwise you can unbind from the *hci driver and rebind to the pciback
driver dynamically using sysfs. I use this script:


if [ $# -eq 0 ] ; then
   echo "Require a PCI device as parameter"
   exit 1

for pcidev in $@ ; do
    if [ -h /sys/bus/pci/devices/"$pcidev"/driver ] ; then

        echo "Unbinding $pcidev from" $(basename $(readlink 
        echo -n "$pcidev" > /sys/bus/pci/devices/"$pcidev"/driver/unbind
    echo "Binding $pcidev to pciback"
    echo -n "$pcidev" > /sys/bus/pci/drivers/pciback/new_slot
    echo -n "$pcidev" > /sys/bus/pci/drivers/pciback/bind

Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.