From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: how to PCI-passthrough 1 card to a DomU when another @ Dom0 uses the same driver? Date: Thu, 3 Feb 2011 12:42:04 -0500 Message-ID: <20110203174204.GA5677@dumpdata.com> References: <1296623011.3053.1418495679@webmail.messagingengine.com> <20110202202705.GD19684@dumpdata.com> <1296683031.21707.1418639239@webmail.messagingengine.com> <20110203162652.GA3712@dumpdata.com> <1296753170.32147.1418788499@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1296753170.32147.1418788499@webmail.messagingengine.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: dev001 Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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.