[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] Xen & USB using PCI delegation


  • To: <xen-users@xxxxxxxxxxxxxxxxxxx>
  • From: "Joris Dobbelsteen" <Joris@xxxxxxxxxxxxxxxxxxxxx>
  • Date: Mon, 18 Feb 2008 18:21:59 -0000
  • Delivery-date: Mon, 18 Feb 2008 10:22:41 -0800
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • Thread-index: AchyWyY4qGOJUK5GRROY65/yzagV+Q==
  • Thread-topic: Xen & USB using PCI delegation

Dear,

Currently I'm trying to set up a print server on a domU. I'm trying to
get a ICH9 USB controller working on a Xen DomU, which was quite
painless. Next step was to get a HP Laserjet 1012 working. Unfortunally
I seem to have increasingly less success after every step I taking.

=== Configuration

The following configuration is used:

Host:
Gentoo Linux 2007.0 distribution
Xen 3.1.2
Linux 2.6.20-xen-r6 #15 SMP
  x86_64 (Core(TM)2 Duo CPU E6750)
Mainboard has the G33 chipset with ICH9R south bridge.
(It's a Gigabyte GA-G33-DS3R)

Guest:
Debian Etch 4.0
Linux 2.6.18-6 (latest debian xen-kernel)


=== Problems:

Basically I have a lot of kernel crashes that seem related to the
printer driver (usblp?) or something in the kernel.

Ive tried a lot of variations so far:
* without anything special
* with "permissive" enabled in Xen
* Passing "swiotlb=force" to the guest

=== Question:

How do I solve this problem (or work arround it)?


=== Thoughts:

Somebody suggesting setting some usblp value from 8192 to 4096 (which
happens to go from 2 to 1 page in memory)?

=== Undesired answer:

Use Dom0 as print server instead...

===

Thanks,

- Joris

=== Attempt 1 ===
Only hidden PCI device and delegated to domU
Output is reduced to what I think is useful...

Bootdata ok (command line is root=/dev/sda1 )
Linux version 2.6.18-6-xen-amd64 (Debian 2.6.18.dfsg.1-18etch1)
(waldi@xxxxxxxxxx) (gcc version 4.1.2 20061115 (prerelease) (Debian
4.1.1-21)) #1 SMP Sun Feb 10 18:02:52 UTC 2008
Software IO TLB disabled
PCI: setting up Xen PCI frontend stub
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: System does not support PCI
PCI: System does not support PCI
pcifront pci-0: Installing PCI frontend
pcifront pci-0: Creating PCI Frontend Bus 0000:00
Event-channel device installed.
netfront: Initialising virtual ethernet driver.
USB Universal Host Controller Interface driver v3.0
PCI: Enabling device 0000:00:00.1 (0000 -> 0001)
uhci_hcd 0000:00:00.1: UHCI Host Controller
uhci_hcd 0000:00:00.1: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:00.1: irq 21, io base 0x0000e300
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usb 1-2: new full speed USB device using uhci_hcd and address 2
usb 1-2: configuration #1 chosen from 1 choice
Starting the hotplug events dispatcher: udevd.
drivers/usb/class/usblp.c: out of memory for write buf
usblp: probe of 1-2:1.0 failed with error -5
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Starting HP Linux Printing and Imaging System: hpiod hpssd.
Starting Common Unix Printing System: cupsdlp: driver loaded but no
devices found

Debian GNU/Linux 4.0 tty1

printgilze login: Fatal DMA error! Please use 'swiotlb=force'
----------- [cut here ] --------- [please bite here ] ---------
Kernel BUG at arch/x86_64/kernel/../../i386/kernel/pci-dma-xen.c:343
invalid opcode: 0000 [1] SMP
CPU 0
Modules linked in: ipv6 ppdev parport_pc lp parport dm_snapshot
dm_mirror dm_mod usblp evdev pcspkr 8250 serial_core xfs uhci_hcd
Pid: 1450, comm: hpiod Not tainted 2.6.18-6-xen-amd64 #1
RIP: e030:[<ffffffff80269bac>]  [<ffffffff80269bac>]
dma_map_single+0x128/0x178
RSP: e02b:ffff880003845bf8  EFLAGS: 00010296
RAX: 000000000000002f RBX: ffff880005918000 RCX: ffff880003844000
RDX: ffffffffff578000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 000000004b5aa000 R08: ffffffff80450088 R09: 000000000000002d
R10: 000000000000153e R11: 0000000000000000 R12: 0000000000002000
R13: ffff880005782070 R14: ffff880004daa600 R15: ffff88000283eb94
FS:  0000000000000000(0063) GS:ffffffff804c3000(0000)
knlGS:0000000000000000
CS:  e033 DS: 0000 ES: 0000
Process hpiod (pid: 1450, threadinfo ffff880003844000, task
ffff88000500f7b0)
Stack:  ffff88000157e7c0  ffff88000283eb80  00000000ffffffff
ffff88000283eb80
 ffff880004d0d000  ffffffff8037ace3  0000000000000000  000000d0802a61a2
 ffff88000157e7c0  ffffffff8020aa86
Call Trace:
 [<ffffffff8037ace3>] hcd_submit_urb+0x697/0x746
 [<ffffffff8020aa86>] kmem_cache_alloc+0x56/0x61
 [<ffffffff8025b08d>] cache_alloc_refill+0x6c/0x4eb
 [<ffffffff8037fd3f>] proc_do_submiturb+0x6ff/0x7c4
 [<ffffffff8038176b>] usbdev_ioctl+0xe48/0x1393
 [<ffffffff80266ba8>] monotonic_clock+0x35/0x7a
 [<ffffffff8025e2f1>] thread_return+0x0/0xfc
 [<ffffffff8025e34e>] thread_return+0x5d/0xfc
 [<ffffffff80227635>] do_filp_open+0x2d/0x3d
 [<ffffffff80241882>] do_ioctl+0x55/0x6b
 [<ffffffff80231010>] vfs_ioctl+0x252/0x26b
 [<ffffffff8024bb57>] sys_ioctl+0x59/0x78
 [<ffffffff8025be0e>] system_call+0x86/0x8b
 [<ffffffff8025bd88>] system_call+0x0/0x8b


Code: 0f 0b 68 ca 77 40 80 c2 57 01 4d 85 ed 74 11 49 8b 85 18 02
RIP  [<ffffffff80269bac>] dma_map_single+0x128/0x178
 RSP <ffff880003845bf8>
  ... kernel: invalid opcode: 0000 [1] SMP



=== Attempt 2 ===
Permissive PCI device...
(Somebody else seems to have success doing this)
Output is reduced to what I think is useful...

PCI: setting up Xen PCI frontend stub
xen_mem: Initialising balloon driver.
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: System does not support PCI
PCI: System does not support PCI
pcifront pci-0: Installing PCI frontend
pcifront pci-0: Creating PCI Frontend Bus 0000:00
Event-channel device installed.
netfront: Initialising virtual ethernet driver.
USB Universal Host Controller Interface driver v3.0
PCI: Enabling device 0000:00:00.1 (0000 -> 0001)
uhci_hcd 0000:00:00.1: UHCI Host Controller
uhci_hcd 0000:00:00.1: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:00.1: irq 21, io base 0x0000e300
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usb 1-2: new full speed USB device using uhci_hcd and address 2
usb 1-2: configuration #1 chosen from 1 choice
INIT: version 2.86 booting
Starting the hotplug events dispatcher: udevd.
drivers/usb/class/usblp.c: out of memory for write buf
usblp: probe of 1-2:1.0 failed with error -5
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Activating swap...Adding 131064k swap on /dev/sda2.  Priority:-1
extents:1 across:131064k
Starting HP Linux Printing and Imaging System: hpiod hpssd.
Starting Common Unix Printing System: cupsdlp: driver loaded but no
devices found

Debian GNU/Linux 4.0 tty1

printgilze login: Fatal DMA error! Please use 'swiotlb=force'
----------- [cut here ] --------- [please bite here ] ---------
Kernel BUG at arch/x86_64/kernel/../../i386/kernel/pci-dma-xen.c:343
invalid opcode: 0000 [1] SMP
CPU 0
Modules linked in: ipv6 ppdev parport_pc lp parport dm_snapshot
dm_mirror dm_mod evdev usblp pcspkr 8250 serial_core xfs uhci_hcd
Pid: 1457, comm: hpiod Not tainted 2.6.18-6-xen-amd64 #1
RIP: e030:[<ffffffff80269bac>]  [<ffffffff80269bac>]
dma_map_single+0x128/0x178
RSP: e02b:ffff880003cabbf8  EFLAGS: 00010296
RAX: 000000000000002f RBX: ffff880004f04000 RCX: ffff880003caa000
RDX: ffffffffff578000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 000000004bfbe000 R08: ffffffff80450088 R09: 000000000000002d
R10: 000000000000155f R11: 0000000000000000 R12: 0000000000002000
R13: ffff880005782070 R14: ffff880005127800 R15: ffff880002861b94
FS:  00002b3d75086710(0063) GS:ffffffff804c3000(0000)
knlGS:0000000000000000
CS:  e033 DS: 0000 ES: 0000
Process hpiod (pid: 1457, threadinfo ffff880003caa000, task
ffff880005095830)
Stack:  ffff88000157e7c0  ffff880002861b80  00000000ffffffff
ffff880002861b80
 ffff880004d0a000  ffffffff8037ace3  0000000000000000  000000d0802a61a2
 ffff88000157e7c0  ffffffff8020aa86
Call Trace:
 [<ffffffff8037ace3>] hcd_submit_urb+0x697/0x746
 [<ffffffff8020aa86>] kmem_cache_alloc+0x56/0x61
 [<ffffffff8025b08d>] cache_alloc_refill+0x6c/0x4eb
 [<ffffffff8037fd3f>] proc_do_submiturb+0x6ff/0x7c4
 [<ffffffff8038176b>] usbdev_ioctl+0xe48/0x1393
 [<ffffffff80227635>] do_filp_open+0x2d/0x3d
 [<ffffffff80241882>] do_ioctl+0x55/0x6b
 [<ffffffff80231010>] vfs_ioctl+0x252/0x26b
 [<ffffffff8024bb57>] sys_ioctl+0x59/0x78
 [<ffffffff8025be0e>] system_call+0x86/0x8b
 [<ffffffff8025bd88>] system_call+0x0/0x8b


Code: 0f 0b 68 ca 77 40 80 c2 57 01 4d 85 ed 74 11 49 8b 85 18 02
RIP  [<ffffffff80269bac>] dma_map_single+0x128/0x178
 RSP <ffff880003cabbf8>
  ... kernel: invalid opcode: 0000 [1] SMP

=== Attempt 2 ===
Use "swiotlb=force" (as suggested...)
NOT Permissive
This seems to be heading the opposite direction that I'm desiring...
Output is reduced to what I think is useful...

Bootdata ok (command line is root=/dev/sda1 swiotlb=force)
Linux version 2.6.18-6-xen-amd64 (Debian 2.6.18.dfsg.1-18etch1)
(waldi@xxxxxxxxxx) (gcc version 4.1.2 20061115 (prerelease) (Debian
4.1.1-21)) #1 SMP Sun Feb 10 18:02:52 UTC 2008
BIOS-provided physical RAM map:
 Xen: 0000000000000000 - 0000000006800000 (usable)
No mptable found.
Built 1 zonelists.  Total pages: 26624
Kernel command line: root=/dev/sda1 swiotlb=force
Initializing CPU#0
PID hash table entries: 512 (order: 9, 4096 bytes)
Xen reported: 2666.666 MHz processor.
Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
Inode-cache hash table entries: 8192 (order: 4, 65536 bytes)
----------- [cut here ] --------- [please bite here ] ---------
Kernel BUG at lib/../arch/i386/kernel/swiotlb.c:162
invalid opcode: 0000 [1] SMP
CPU 0
Modules linked in:
Pid: 0, comm: swapper Not tainted 2.6.18-6-xen-amd64 #1
RIP: e030:[<ffffffff8030c84c>]  [<ffffffff8030c84c>]
swiotlb_init_with_default_size+0xa0/0x19e
RSP: e02b:ffffffff804dbf40  EFLAGS: 00010282
RAX: 00000000fffffff4 RBX: 0000000000000000 RCX: 0000000000000006
RDX: ffffffffff578000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000004000000 R08: 0000000000001000 R09: ffffffff80522040
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffffffff804c3000(0000)
knlGS:0000000000000000
CS:  e033 DS: 0000 ES: 0000
Process swapper (pid: 0, threadinfo ffffffff804da000, task
ffffffff8044bce0)
Stack:  0000000000000000  0000000000020800  0000000000000000
ffffffff8026e2b2
 0000000000000000  ffffffff804ecf2a  0000000000000000  0000000000020800
 0000000000000000  0000000000000000
Call Trace:
 [<ffffffff8026e2b2>] pci_swiotlb_init+0x9/0x2d
 [<ffffffff804ecf2a>] mem_init+0x5e/0x233
 [<ffffffff804e36ea>] start_kernel+0x189/0x21a
 [<ffffffff804e320d>] _sinittext+0x20d/0x213


Code: 0f 0b 68 e1 36 41 80 c2 a2 00 48 83 eb 80 48 8b 05 67 20 24
RIP  [<ffffffff8030c84c>] swiotlb_init_with_default_size+0xa0/0x19e
 RSP <ffffffff804dbf40>
 <0>Kernel panic - not syncing: Attempted to kill the idle task!


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.