WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] how to PCI-passthrough 1 card to a DomU when another @ D

To: "Konrad Rzeszutek Wilk" <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] how to PCI-passthrough 1 card to a DomU when another @ Dom0 uses the same driver?
From: "dev001" <pgngw+dev001+xen-users@xxxxxx>
Date: Thu, 03 Feb 2011 09:12:50 -0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 03 Feb 2011 09:13:43 -0800
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:from:to:cc:mime-version:content-transfer-encoding:content-type:in-reply-to:references:reply-to:subject:date; s=smtpout; bh=yr9o4Njc1sNHqB3i0sAMMLCOtME=; b=dSgthLIukf38IdS30lR5zUAjvpbq6Wc2LrhZiBNtHnOEFxcKN1Mtu+gCGA+Xc3njjmwBX1xw00cloV2tnrQ8HxKEyYC+ALmCqmoe/fIWyvBs5soy05J6QLboqZUX3HSQldv8sXwjGzU58QqKs8bzQQwlQeUPUUagwhwR++aeSbU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110203162652.GA3712@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1296623011.3053.1418495679@xxxxxxxxxxxxxxxxxxxxxxxxxxx><20110202202705.GD19684@xxxxxxxxxxxx><1296683031.21707.1418639239@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20110203162652.GA3712@xxxxxxxxxxxx>
Reply-to: pgngw+dev001+xen-users@xxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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








> >  CONFIG_XEN_PCIDEV_BACKEND=m      <--------------------
> 
> Pfff.. sucks.

curious, why?  and if it legitimately does, any clue why @opensuse does
it that way?

> > > What happens if you 'rmmod sky2' or blacklist the sky2 driver?

i assume a still relevant question ... so, try this for which of the
above (or other?) cases?

thanks.

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