前几天弄到一块pci usb扩展卡,想要把它传递到vm里面,可是xen报错:
Error: pci: PCI Backend and pci-stub don't own sibling device 0000:00:00.0 of device 0000:0a:01.0
运行 “lspci -tv”得到:
-[0000:00]-+-00.0 Intel Corporation 2nd Generation Core Processor Family DRAM Controller +-01.0-[01]--+-00.0 Advanced Micro Devices [AMD] nee ATI Barts PRO [ATI Radeon HD 6800 Series] | \-00.1 Advanced Micro Devices [AMD] nee ATI Barts HDMI Audio [Radeon HD 6800 Series] +-02.0 Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller +-16.0 Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 +-1a.0 Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 +-1b.0 Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller +-1c.0-[02]-- +-1c.4-[03]----00.0 Marvell Technology Group Ltd. 88SE9120 SATA 6Gb/s Controller +-1c.5-[04]----00.0 Etron Technology, Inc. EJ168 USB 3.0 Host Controller +-1c.6-[05]----00.0 Etron Technology, Inc. EJ168 USB 3.0 Host Controller +-1c.7-[06-0f]----00.0-[07-0f]--+-01.0-[08]-- | +-04.0-[09-0a]----00.0-[0a]--+-01.0 VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller | | +-01.1 VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller | | \-01.2 VIA Technologies, Inc. USB 2.0 | +-05.0-[0b]----00.0 VIA Technologies, Inc. VT6315 Series Firewire Controller | +-06.0-[0c]----00.0 Broadcom Corporation NetLink BCM57781 Gigabit Ethernet PCIe | +-07.0-[0d]-- | +-08.0-[0e]-- | \-09.0-[0f]-- +-1d.0 Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 +-1f.0 Intel Corporation Z68 Express Chipset Family LPC Controller +-1f.2 Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller \-1f.3 Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller
原来这个pci设备被安装在pci bridge后面了。好在xen-users里有人问过这个问题,也给出了workaround。详见:
http://old-list-archives.xen.org/archives/html/xen-users/2011-04/msg00211.html
简单来说就是把/usr/lib/xen-4.1/lib/python/xen/xend/server/pciif.py里面的几行注释掉。注释掉的内容是285行开始:
if sdev.driver!='pciback' and sdev.driver!='pci-stub': raise VmError(("pci: PCI Backend and pci-stub don't "+ \ "own sibling device %s of device %s"\ )%(sdev.name, dev.name))
暂时用起来没发现问题。