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

Re: [Xen-devel] how to PCI-passthrough 1 card to a DomU when another @ Dom0 uses the same driver?



On Thu, Feb 03, 2011 at 09:12:50AM -0800, dev001 wrote:
> hi,
> 
> > readlink //sys/bus/pci/devices/0000:04:00.0/driver
> > ../../../../bus/pci/drivers/pciback
> > 
> > I want you to do for 02:00.0 and see if it points to pciback before you
> > launch any guests. 
> 
> thanks for clarifying that.
> 
> not exhaustive, but hopefully sufficiently informative,
> 
> grep PCI /boot/config-2.6.34.8-8-xen | grep BACK
>       CONFIG_XEN_PCIDEV_BACKEND=m
>       CONFIG_XEN_PCIDEV_BACKEND_VPCI=y
>       # CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
>       # CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
>       # CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER is not set
> 
> lspci | grep -i eth
>       02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
>       RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
>       03:00.0 Ethernet controller: Marvell Technology Group Ltd.
>       88E8053 PCI-E Gigabit Ethernet Controller (rev 20)
>       04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
>       RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
> 
> ######################
> case 1)
> 
> grep pci /boot/grub/menu.lst
>     module /vmlinuz-xen ...
>     pci=resource_aligment=0000:02:00.0;0000:03:0.0
> 
> cat /etc/init.d/boot.local
>       (empty)
> 
> cat /etc/modprobe.d/99-local.conf
>       options pciback hide=(0000:02:00.0)(0000:03:00.0)
>       install sky2       /sbin/modprobe pciback ; /sbin/modprobe
>       --first-time --ignore-install sky2
>       install r8169      /sbin/modprobe pciback ; /sbin/modprobe
>       --first-time --ignore-install r8169
> 
> reboot
> dmesg | grep -i seiz
>       (empty)
> 
> readlink //sys/bus/pci/devices/0000:02:00.0/driver
>       ../../../../bus/pci/drivers/r8169
> readlink //sys/bus/pci/devices/0000:03:00.0/driver
>       ../../../../bus/pci/drivers/sky2
> readlink //sys/bus/pci/devices/0000:04:00.0/driver
>       ../../../../bus/pci/drivers/r8169
> 
> ######################
> case 2)
> 
> grep pci /boot/grub/menu.lst
>     module /vmlinuz-xen ...
>     pci=resource_aligment=0000:02:00.0;0000:03:0.0
>     pciback.hide=(0000:02:00.0)(0000:03:00.0)
> 
> cat /etc/init.d/boot.local
>       (empty)
> 
> cat /etc/modprobe.d/99-local.conf
>       options pciback hide=(0000:02:00.0)(0000:03:00.0)
>       install sky2       /sbin/modprobe pciback ; /sbin/modprobe
>       --first-time --ignore-install sky2
>       install r8169      /sbin/modprobe pciback ; /sbin/modprobe
>       --first-time --ignore-install r8169
> 
> reboot
> dmesg | grep -i seiz
>       [    2.083424] pciback 0000:03:00.0: seizing device
> 
> readlink //sys/bus/pci/devices/0000:02:00.0/driver
>       ../../../../bus/pci/drivers/r8169
> readlink //sys/bus/pci/devices/0000:03:00.0/driver
>       ../../../../bus/pci/drivers/pciback
> readlink //sys/bus/pci/devices/0000:04:00.0/driver
>       ../../../../bus/pci/drivers/r8169
> 
> ######################
> case 3)
> 
> grep pci /boot/grub/menu.lst
>     module /vmlinuz-xen ...
>     pci=resource_aligment=0000:02:00.0;0000:03:0.0
>     pciback.hide=(0000:02:00.0)(0000:03:00.0)
> 
> cat /etc/init.d/boot.local
>       (empty)
> 
> cat /etc/modprobe.d/99-local.conf
>       (empty)
> 
> reboot
> dmesg | grep -i seiz
>       [    2.077673] pciback 0000:03:00.0: seizing device
> 
> readlink //sys/bus/pci/devices/0000:02:00.0/driver
>       ../../../../bus/pci/drivers/r8169
> readlink //sys/bus/pci/devices/0000:03:00.0/driver
>       ../../../../bus/pci/drivers/pciback
> readlink //sys/bus/pci/devices/0000:04:00.0/driver
>       ../../../../bus/pci/drivers/r8169
> 
> ######################
> case 3)
> 
> grep pci /boot/grub/menu.lst
>     module /vmlinuz-xen ...
>     pci=resource_aligment=0000:02:00.0;0000:03:0.0
> 
> cat /etc/init.d/boot.local
>       DEV="0000:02:00.0 0000:03:00.0"
>       for BDF in $DEV 
>       do 
>           [ ! -e /sys/bus/pci/devices/$BDF/driver/unbind ] || \
>                   echo -n $BDF >
>                   /sys/bus/pci/devices/$BDF/driver/unbind
>           echo -n $BDF > /sys/bus/pci/drivers/pciback/new_slot
>           echo -n $BDF > /sys/bus/pci/drivers/pciback/bind
>           echo -n $BDF > sys/bus/pci/drivers/pciback/permissive
>       done 
> 
> cat /etc/modprobe.d/99-local.conf
>       (empty)
> 
> reboot
> dmesg | grep -i seiz
>       [   32.664674] pciback 0000:02:00.0: seizing device
>       [   32.688310] pciback 0000:03:00.0: seizing device
> 
> readlink //sys/bus/pci/devices/0000:02:00.0/driver
>       ../../../../bus/pci/drivers/pciback
> readlink //sys/bus/pci/devices/0000:03:00.0/driver
>       ../../../../bus/pci/drivers/pciback
> readlink //sys/bus/pci/devices/0000:04:00.0/driver
>       ../../../../bus/pci/drivers/r8169

Yeeey! No idea why the previous steps didn't assign it to pciback. Looks like
it is ignoring your wishes from /etc/modprobe.d/* files.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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