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

[Xen-devel] RE: pci pass-through failure on xen 3.3.0

To: 'Masroor Vettuparambil' <Masroor.Vettuparambil@xxxxxxxxxxxx>, "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: pci pass-through failure on xen 3.3.0
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Wed, 8 Oct 2008 17:16:11 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc:
Delivery-date: Wed, 08 Oct 2008 02:18:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <78C9135A3D2ECE4B8162EBDCE82CAD7702CDD101@nekter>
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: <78C9135A3D2ECE4B8162EBDCE82CAD7702CDD101@nekter>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acko3VSaB4lyD4G+Q0ygmzFk+XBuVwASJuLg
Thread-topic: pci pass-through failure on xen 3.3.0
Hi Masroor,
Looks there is an incorrect assumption.
Could you please help to test the attached patch? If it doesn't work, can you attached your output of "lspci -tv" and "lspci -xxx -vvv"?
 
Thanks!
 

-- Dexuan

 


From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Masroor Vettuparambil
Sent: 2008年10月8日 8:33
To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] pci pass-through failure on xen 3.3.0

Hi all,

 

I downloaded the xen 3.3.0 and now testing the pci pass-through with the NIC.

Using late binding, the pci slot  0000:08:01.0 is assigned to pciback.

But pci related xm commands are not working.

 

For eg:

linux-242:/home/xen-3.3.0 # xm pci-list-assignable-devices

Unexpected error: <type 'exceptions.OSError'>

 

Please report to xen-devel@xxxxxxxxxxxxxxxxxxx

Traceback (most recent call last):

  File "/usr/sbin/xm", line 10, in <module>

    main.main(sys.argv)

  File "//usr/lib64/python/xen/xm/main.py", line 2883, in main

    _, rc = _run_cmd(cmd, cmd_name, args)

  File "//usr/lib64/python/xen/xm/main.py", line 2907, in _run_cmd

    return True, cmd(args)

  File "//usr/lib64/python/xen/xm/main.py", line 2202, in xm_pci_list_assignable_devices

    devs_list = check_FLR_capability(dev_list)

  File "/usr/lib64/python2.5/xen/util/pci.py", line 288, in check_FLR_capability

    coassigned_pci_list = dev.find_coassigned_devices(True)

  File "/usr/lib64/python2.5/xen/util/pci.py", line 461, in find_coassigned_devices

    dev = self.find_the_uppermost_pci_bridge()

  File "/usr/lib64/python2.5/xen/util/pci.py", line 424, in find_the_uppermost_pci_bridge

    dev_parent = PciDevice(dom, b, d, f)

  File "/usr/lib64/python2.5/xen/util/pci.py", line 382, in __init__

    self.detect_dev_info()

  File "/usr/lib64/python2.5/xen/util/pci.py", line 604, in detect_dev_info

    class_dev = self.pci_conf_read16(PCI_CLASS_DEVICE)

  File "/usr/lib64/python2.5/xen/util/pci.py", line 567, in pci_conf_read16

    fd = os.open(self.cfg_space_path, os.O_RDONLY)

OSError: [Errno 2] No such file or directory: '/sys/bus/pci/devices/0000:06:00.0/config'

 

I checked the above python scripts.

The function find_parent() in file util/pci.py, tries to find the parent device from the file link ../../../devices/pci0000:06/0000:06:01.0/0000:08:01.0

When it sees pci0000:06, it tries to read the config space of 0000:06:00.0 which doesn’t exist. This causes the above error.

 

Lspci tree is,

 

linux-242:/home/xen-3.3.0 # lspci -t

-+-[0000:06]-+-01.0-[0000:08]----01.0

 |           +-01.1

 |           +-02.0-[0000:07]--

 |           \-02.1

 \-[0000:00]-+-00.0

             +-01.0

             +-01.1

             +-06.0

             +-07.0

             +-08.0

             +-09.0-[0000:05]----07.0

             +-0b.0-[0000:04]----00.0

             +-0c.0-[0000:03]----00.0

             +-0d.0-[0000:02]--

             +-0e.0-[0000:01]--

             +-18.0

             +-18.1

             +-18.2

             +-18.3

             +-19.0

             +-19.1

             +-19.2

             \-19.3

 

Thanks,

Masroor

Attachment: fix_find_parent.patch
Description: fix_find_parent.patch

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