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/
Home Products Support Community News


[Xen-users] PCI/USB forward to domU works, but this is a strange problem

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] PCI/USB forward to domU works, but this is a strange problem!
From: "Reinhard Proessler" <rpr-listen@xxxxxx>
Date: Wed, 17 Sep 2008 09:39:04 +0200
Delivery-date: Wed, 17 Sep 2008 00:39:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx

I'm fighting with a strange problem.
I've setup PCI to domU forwarding with the configuration/setup below. 
The problem:

If the USB device is unplugged and I start the the domU, the virtual machine 
comes up without problems.
The command lspci shows the controller:

00:00.0 USB Controller: Intel Corporation 82801CA/CAM USB Controller #1 (rev 02)

If I plug in the USB cable of the USB device it is found immediately, lsusb 

Bus 001 Device 002: ID 057c:2000 AVM GmbH ISDN-Connector FRITZ!X
Bus 001 Device 001: ID 0000:0000

This is what I expected. So far so good!

But if I shutdown the virtuell machine (domU) and leave the USB device plugged 
then the virt. machine crashes on the next boot.

I can repeat it so often as I want:

unplugged device -> start of domU -> plug in the the device -> everything is 
device pluged in -> start of domU -> crash.

Well, i tried 'swiotlb=force', as suggestet in the crash message, but only then 
the crash message is only different. 

Can anybody enlighten me a little bit where the problem might be??

Kind Regards

My environment:
DELL 2600 with 
01:1d.0 PCI bridge: Intel Corporation 82870P2 P64H2 Hub PCI Bridge (rev 04)

OS RedHat EL 5.2
with kernel 2.6.18-92.1.10.el5xen, pciback as a module, pci frontend = Y

USB device is 
Bus 001 Device 002: ID 057c:2000 AVM GmbH ISDN-Connector FRITZ!X

in /etc/modprobe.conf
options pciback hide=(0000:00:1d.0)

in a script:
modprobe pciback
# Unbind a PCI network card from its network driver
echo -n $SLOT > /sys/bus/pci/drivers/uhci_hcd/unbind
# And now bind it to the PCI Backend
echo -n $SLOT > /sys/bus/pci/drivers/pciback/new_slot
echo -n $SLOT > /sys/bus/pci/drivers/pciback/bind

in the domU configuration:
pci = [ '0000:00:1d.0' ]
usb = 1
usbdevice = [ 'host:057c:2000' ] 

and start the domU crashes immediately:

PCI: Fatal: No PCI config space access function found
rtc: IRQ 8 is not free.
i8042.c: No controller found.

Fatal DMA error! Please use 'swiotlb=force'
------------[ cut here ]------------
kernel BUG at arch/i386/kernel/pci-dma-xen.c:401!
invalid opcode: 0000 [#1]
last sysfs file: /block/ram0/dev
Modules linked in: dm_snapshot dm_zero dm_mirror dm_mod xenblk ext3 jbd 
uhci_hcd ohci_hcd ehci_hcd
CPU:    0
EIP:    0061:[<c040a39c>]    Not tainted VLI
EFLAGS: 00010292   (2.6.18-92.1.10.el5xen #1)
EIP is at dma_map_single+0x12d/0x147
eax: 0000002f   ebx: 00000000   ecx: 00000001   edx: f5416000
esi: 042a07e0   edi: 00000001   ebp: 00000008   esp: c0de1dbc
ds: 007b   es: 007b   ss: 0069
Process khubd (pid: 23, ti=c0de1000 task=c0dddaa0 task.ti=c0de1000)
Stack: c0622b1d c0da1c48 0082f7e0 00000000 c0da1c48 dff690c0 00000000 c0938c34
       c057c3c3 00000001 00000010 dfff9800 c057b122 00000000 dff690c0 00000000
       c057c387 c0de1f20 c0772f21 c0de1f20 ffffffff c04e3117 00000002 00000000
Call Trace:
 [<c057c3c3>] hcd_submit_urb+0x649/0x739
 [<c057b122>] usb_hcd_giveback_urb+0x28/0x53
 [<c057c387>] hcd_submit_urb+0x60d/0x739
 [<c04e3117>] vsnprintf+0x41f/0x45d
 [<c06094b8>] _spin_lock_irqsave+0x8/0x28
 [<c04219a2>] release_console_sem+0x18c/0x1c6
 [<c057c6c3>] usb_submit_urb+0x1b3/0x1d6
 [<c057cb49>] usb_start_wait_urb+0x39/0xd0
 [<c057cdc8>] usb_control_msg+0xc5/0xcf
 [<c057cdb8>] usb_control_msg+0xb5/0xcf
 [<c06f2800>] sanitize_e820_map+0x223/0x2b0
 [<c05789bb>] hub_port_init+0x1e4/0x46d
 [<c057a55d>] hub_thread+0x4f6/0x98d
 [<c06f2800>] sanitize_e820_map+0x223/0x2b0
 [<c060000a>] xfrm_add_policy+0xc7/0x153
 [<c06f2800>] sanitize_e820_map+0x223/0x2b0
 [<c043193f>] autoremove_wake_function+0x0/0x2d
 [<c057a067>] hub_thread+0x0/0x98d
 [<c043187d>] kthread+0xc0/0xeb
 [<c04317bd>] kthread+0x0/0xeb
 [<c0403005>] kernel_thread_helper+0x5/0xb
Code: c0 74 07 8b 08 8b 58 04 eb 05 83 c9 ff 31 db 89 da 89 c8 f7 d2 f7 d0 21 
fa 21 f0 89 d1 09 c1 74 13 68 1d 2b 62 c0 e8 de 7b 01 00 <0f> 0b 91 01 fe 2a 62 
c0 5d f0 83 04 24 00 83 c4 0c 89 f0 89 fa
EIP: [<c040a39c>] dma_map_single+0x12d/0x147 SS:ESP 0069:c0de1dbc
 <0>Kernel panic - not syncing: Fatal exception

Xen-users mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] PCI/USB forward to domU works, but this is a strange problem!, Reinhard Proessler <=