|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] xen and pci
On Sat, 30 Oct 2004, Keir Fraser wrote:
*However* I think that pcmcia/cardbus bridges are safe to tell dom0
about (Xen cannot probe behind them) and they have a special subtype
that we could detect. So we can rejig the test that hides the bridges to
be a little bit smarter.
--- common/physdev.c 2004-10-22 11:51:50.918741798 +0100
+++ common-new/physdev.c 2004-10-30 08:40:33.513342843 +0100
@@ -747,7 +747,8 @@
*
* In Linux2.6 we set pcibios_scan_all_fns().
*/
- if ( dev->hdr_type != PCI_HEADER_TYPE_NORMAL )
+ if ( (dev->hdr_type != PCI_HEADER_TYPE_NORMAL) &&
+ (dev->hdr_type != PCI_HEADER_TYPE_CARDBUS) )
continue;
pdev = xmalloc(sizeof(phys_dev_t));
pdev->dev = dev;
The lack of pcmcia network was annoying me so I poked more around.
The above fix helps in that linux can find the cardbus bridge.
HOWEVER, once it finds it would like to configure devices behind this
bridge, and it seems the xen prevents linux from doing just that.
It seems like linux treats the stuff it finds behind cardbus bridge like
PCI device (i'm not sure if it is a real device or just how linux treats
it a virtual pci devices).
thus for output of /sbin/lspci from linux classic we get
redbull:/usr/src/cm/xen # /sbin/lspci
0000:00:00.0 Host bridge: Intel Corp. 82830 830 Chipset Host Bridge (rev 02)
0000:00:01.0 PCI bridge: Intel Corp. 82830 830 Chipset AGP Bridge (rev 02)
0000:00:1d.0 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #1) (rev 01)
0000:00:1d.1 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #2) (rev 01)
0000:00:1d.2 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #3) (rev 01)
0000:00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI Bridge (rev 41)
0000:00:1f.0 ISA bridge: Intel Corp. 82801CAM ISA Bridge (LPC) (rev 01)
0000:00:1f.1 IDE interface: Intel Corp. 82801CAM IDE U100 (rev 01)
0000:00:1f.3 SMBus: Intel Corp. 82801CA/CAM SMBus Controller (rev 01)
0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801CA/CAM AC'97 Audio
Controller (rev 01)
0000:01:00.0 VGA compatible controller: S3 Inc. SuperSavage IX/C SDR (rev 05)
0000:02:00.0 CardBus bridge: Texas Instruments PCI1420
0000:02:00.1 CardBus bridge: Texas Instruments PCI1420
0000:02:02.0 Communication controller: Lucent Microelectronics WinModem 56k
(rev 01)
0000:02:08.0 Ethernet controller: Intel Corp. 82801CAM (ICH3) PRO/100 VE (LOM)
Ethernet Controller (rev 41)
0000:07:00.0 Ethernet controller: Xircom Cardbus Ethernet 10/100 (rev 03)
redbull:/usr/src/cm/xen # /sbin/lspci -tv
-[00]-+-00.0 Intel Corp. 82830 830 Chipset Host Bridge
+-01.0-[01]----00.0 S3 Inc. SuperSavage IX/C SDR
+-1d.0 Intel Corp. 82801CA/CAM USB (Hub #1)
+-1d.1 Intel Corp. 82801CA/CAM USB (Hub #2)
+-1d.2 Intel Corp. 82801CA/CAM USB (Hub #3)
+-1e.0-[02-08]--+-[07]---00.0 Xircom Cardbus Ethernet 10/100
| \-[02]-+-00.0 Texas Instruments PCI1420
| +-00.1 Texas Instruments PCI1420
| +-02.0 Lucent Microelectronics WinModem 56k
| \-08.0 Intel Corp. 82801CAM (ICH3) PRO/100 VE
(LOM) Ethernet Controller
+-1f.0 Intel Corp. 82801CAM ISA Bridge (LPC)
+-1f.1 Intel Corp. 82801CAM IDE U100
+-1f.3 Intel Corp. 82801CA/CAM SMBus Controller
\-1f.5 Intel Corp. 82801CA/CAM AC'97 Audio Controller
... but when we repeat it under xenolinux, we don't see the "PCI" device
"Xircom Cardbus Ethernet 10/100" anymore (although we do see the cardbus
bridge)
redbull:/usr/src/cm/xen # /sbin/lspci
0000:00:00.0 Host bridge: Intel Corp. 82830 830 Chipset Host Bridge (rev 02)
0000:00:1d.0 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #1) (rev 01)
0000:00:1d.1 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #2) (rev 01)
0000:00:1d.2 USB Controller: Intel Corp. 82801CA/CAM USB (Hub #3) (rev 01)
0000:00:1f.0 ISA bridge: Intel Corp. 82801CAM ISA Bridge (LPC) (rev 01)
0000:00:1f.1 IDE interface: Intel Corp. 82801CAM IDE U100 (rev 01)
0000:00:1f.3 SMBus: Intel Corp. 82801CA/CAM SMBus Controller (rev 01)
0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801CA/CAM AC'97 Audio
Controller (rev 01)
0000:01:00.0 VGA compatible controller: S3 Inc. SuperSavage IX/C SDR (rev 05)
0000:02:00.0 CardBus bridge: Texas Instruments PCI1420
0000:02:00.1 CardBus bridge: Texas Instruments PCI1420
0000:02:02.0 Communication controller: Lucent Microelectronics WinModem 56k
(rev 01)
0000:02:08.0 Ethernet controller: Intel Corp. 82801CAM (ICH3) PRO/100 VE (LOM)
Ethernet Controller (rev 41)
redbull:/usr/src/cm/xen # /sbin/lspci -tv
-+-[02]-+-00.0 Texas Instruments PCI1420
| +-00.1 Texas Instruments PCI1420
| +-02.0 Lucent Microelectronics WinModem 56k
| \-08.0 Intel Corp. 82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller
+-[01]---00.0 S3 Inc. SuperSavage IX/C SDR
\-[00]-+-00.0 Intel Corp. 82830 830 Chipset Host Bridge
+-1d.0 Intel Corp. 82801CA/CAM USB (Hub #1)
+-1d.1 Intel Corp. 82801CA/CAM USB (Hub #2)
+-1d.2 Intel Corp. 82801CA/CAM USB (Hub #3)
+-1f.0 Intel Corp. 82801CAM ISA Bridge (LPC)
+-1f.1 Intel Corp. 82801CAM IDE U100
+-1f.3 Intel Corp. 82801CA/CAM SMBus Controller
\-1f.5 Intel Corp. 82801CA/CAM AC'97 Audio Controller
poking a bit around we can see that the xircom pci device gets added by
yenta_socket.c. In there yenta_allocate_res() tries to allocate resources
for those devices behing the bridge. However, it appears that xen prevents
xenolinux just from doing that, as shown below.
(XEN) 02:00:01 reg=0x14 len=0x01 val=0x00000210 0 Guest 0 attempting sub-dword
read to BASE_ADDRESS 1
(XEN) PCI: Found IRQ 9 for device 02:00.1
(XEN) PCI: Sharing IRQ 9 with 00:1f.3
(XEN) PCI: Sharing IRQ 9 with 00:1f.5
(XEN) 02:00:01 reg=0x14 len=0x01 val=0x00000210 0 Guest 0 attempting sub-dword
read to BASE_ADDRESS 1
(XEN) 02:00:01 reg=0x18 len=0x04 val=0xb00a0702 0 Guest attempting update to
BASE_ADDRESS 2
(XEN) 02:00:01 reg=0x1c len=0x04 val=0x10c00000 0 Guest attempting update to
BASE_ADDRESS 3
(XEN) 02:00:01 reg=0x20 len=0x04 val=0x10ffffff 0 Guest attempting update to
BASE_ADDRESS 4
(XEN) 02:00:01 reg=0x24 len=0x04 val=0x11000000 0 Guest attempting update to
BASE_ADDRESS 5
(XEN) 02:00:01 reg=0x30 len=0x04 val=0x000048ff 0 caution: guest tried to
change rom address.
(XEN) b=7 d=0 f=0 target does not exist
(XEN) pci_cfgreg_read : 07:00:00 reg=0x0e len=0x01 val=0xffffffff ret=0xffffffed
(XEN) b=7 d=0 f=0 target does not exist
(XEN) pci_cfgreg_read : 07:00:00 reg=0x00 len=0x04 val=0xffffffff ret=0xffffffed
ideas?
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Re: [Xen-devel] xen and pci,
Adam Sulmicki <=
|
|
|
|
|