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

[Xen-users] pciback.hide works great for video, but not usb contollers



Hi all,

After having great success exporting my video card to a paravirt domu, I 
decided to try the USB controllers.  It appears that all should be working, 
but when I connect a USB device, I get a hung box :-(

Here is my info:
DOM0
----------------
Xen 3.1.0, Kubuntu Gutsy AMD64

root@hydra:~# lspci|egrep "USB|VGA"
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI 
Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI 
Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI 
Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI 
Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI 
Controller (rev 02)
05:00.0 VGA compatible controller: nVidia Corporation NV38GL [Quadro FX 1300] 
(rev a2)

root@hydra:~# grep pciback /etc/grub.conf
module          /vmlinuz-2.6.22-14-xen root=/dev/mapper/hydra-root ro 
xencons=xvc console=xvc0 console=tty1 swiotlb=force pciback.hide=(05:00.0)
(00:1d.0)(00:1d.1)(00:1d.2)(00:1d.3)(00:1d.7)

root@hydra:~# cat  /sys/bus/pci/drivers/pciback/slots
0000:05:00.0
0000:00:1d.0
0000:00:1d.1
0000:00:1d.2
0000:00:1d.3
0000:00:1d.7

root@hydra:~# cat /etc/xen/aphrodite.cfg
#
# Configuration file for the Xen instance aphrodite, created
# by xen-tools 3.5 on Mon Nov 26 14:24:09 2007.
#
#
#  Kernel + memory size
#
kernel      = '/boot/vmlinuz-2.6.22-14-xen'
ramdisk     = '/boot/initrd.img-2.6.22-14-xen'
memory      = '2048'
vcpus       = '4'
pci         = 
['05:00.0', '00:1d.0', '00:1d.1', '00:1d.2', '00:1d.3', '00:1d.7']
#extra       = clock=jiffies
#
#  Disk device(s).
#
root        = '/dev/sda1 ro'
disk        = 
[ 'phy:hydra/aphrodite-disk,sda1,w', 'phy:hydra/aphrodite-swap,sda2,w' ]
#
#  Hostname
#
name        = 'aphrodite'
#
#  Networking
#
vif         = [ 'ip=10.0.0.9' ]
#
#  Behaviour
#
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'
-------------------------------------------End of Dom0-----------------------


So, everything looks OK on the Dom0 side

DomU
--------------
Also Kubuntu Gutsy

$ lspci|egrep "USB|VGA"
00:00.0 VGA compatible controller: nVidia Corporation NV38GL [Quadro FX 1300] 
(rev a2)
00:01.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI 
Controller #1 (rev 02)
00:01.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI 
Controller #2 (rev 02)
00:01.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI 
Controller #3 (rev 02)
00:01.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI 
Controller #4 (rev 02)
00:01.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI 
Controller (rev 02)


It looks like USB should work.  When I run "lsusb" the command never 
returns even when run by root.  It is a juggernaut; even "kill -9" won't stop 
it!

When I plug a USB device in, I get hangs all over the place, until I unplug 
it.  I get this in my DomU log:

Feb  6 18:27:31 aphrodite kernel: [87615.162981] usb 1-2: new low speed USB 
device using uhci_hcd and address 2
Feb  6 18:27:31 aphrodite kernel: [87615.163009] Fatal DMA error! Please 
use 'swiotlb=force'
Feb  6 18:27:31 aphrodite kernel: [87615.163060] ------------[ cut 
here ]------------
Feb  6 18:27:31 aphrodite kernel: [87615.163073] kernel BUG 
at 
/build/buildd/linux-source-2.6.22-2.6.22/debian/build/custom-source-xen/arch/x86_64/kernel/../../i386/kernel/pci-dma-xen.c:369!
Feb  6 18:27:31 aphrodite kernel: [87615.163089] invalid opcode: 0000 [1] SMP
Feb  6 18:27:31 aphrodite kernel: [87615.163100] CPU 0
Feb  6 18:27:31 aphrodite kernel: [87615.163109] Modules linked in: 
binfmt_misc rfcomm l2cap bluetooth ppdev parport_pc lp parport isofs udf loop 
ipv6 nfs lockd sunrpc nls_cp437 cifs ehci_hcd uhc
i_hcd nvidia(P) usbcore i2c_core evdev ext3 jbd mbcache raid10 raid456 xor 
raid1 raid0 multipath linear md_mod dm_mirror dm_snapshot dm_mod fuse 
apparmor commoncap
Feb  6 18:27:31 aphrodite kernel: [87615.163249] Pid: 2875, comm: khubd 
Tainted: P       2.6.22-14-xen #1
Feb  6 18:27:31 aphrodite kernel: [87615.163259] RIP: e030:
[dma_map_single+472/544]  [dma_map_single+472/544] dma_map_single+0x1d8/0x220
Feb  6 18:27:32 aphrodite kernel: [87615.163289] RSP: e02b:ffff88007b1afc00  
EFLAGS: 00010282
Feb  6 18:27:32 aphrodite kernel: [87615.163299] RAX: 000000000000003e RBX: 
ffff88000244c3f8 RCX: ffffffffff5f9000
Feb  6 18:27:32 aphrodite kernel: [87615.163309] RDX: 0000000000000000 RSI: 
0000000000000000 RDI: ffffffff80542f60
Feb  6 18:27:32 aphrodite kernel: [87615.163318] RBP: 0000000000000e28 R08: 
0000000000000000 R09: ffff880001f9e000
Feb  6 18:27:32 aphrodite kernel: [87615.163333] R10: 000000000000003c R11: 
0720072007200720 R12: 0000000000000008
Feb  6 18:27:32 aphrodite kernel: [87615.163345] R13: ffff88007eca6870 R14: 
ffff880028ac29c0 R15: 0000000000000010
Feb  6 18:27:32 aphrodite kernel: [87615.163364] FS:  00002b46502f36b0(0000) 
GS:ffffffff80575000(0000) knlGS:0000000000000000
Feb  6 18:27:32 aphrodite kernel: [87615.163379] CS:  e033 DS: 0000 ES: 0000
Feb  6 18:27:32 aphrodite kernel: [87615.163388] Process khubd (pid: 2875, 
threadinfo ffff88007b1ae000, task ffff88007b1a86e0)
Feb  6 18:27:32 aphrodite kernel: [87615.163399] Stack:  ffff88007b1afc40 
ffff880028ac29c0 00000000ffffffff ffff880000701c00
Feb  6 18:27:32 aphrodite kernel: [87615.163428]  ffff880024a4d048 
ffffffff880e6f52 ffff880028ac29d0 0000000000000000
Feb  6 18:27:32 aphrodite kernel: [87615.163455]  ffff88007b1afc62 
ffffffff8022f152 313637385b3e363c 3138393236312e35
Feb  6 18:27:32 aphrodite kernel: [87615.163478] Call Trace:
Feb  6 18:27:32 aphrodite kernel: [87615.163519]  
[_end+128346314/2130180472] :usbcore:usb_hcd_submit_urb+0x452/0x9b0
Feb  6 18:27:32 aphrodite kernel: [87615.163540]  [vprintk+530/992] 
vprintk+0x212/0x3e0
Feb  6 18:27:32 aphrodite kernel: [87615.163577]  
[_end+128350655/2130180472] :usbcore:usb_start_wait_urb+0x87/0xd0
Feb  6 18:27:32 aphrodite kernel: [87615.163615]  
[_end+128350599/2130180472] :usbcore:usb_start_wait_urb+0x4f/0xd0
Feb  6 18:27:32 aphrodite kernel: [87615.163654]  
[_end+128351334/2130180472] :usbcore:usb_control_msg+0xde/0x120
Feb  6 18:27:32 aphrodite kernel: [87615.163692]  
[_end+128327405/2130180472] :usbcore:hub_port_init+0x395/0x610
Feb  6 18:27:32 aphrodite kernel: [87615.163714]  [kobject_init+57/80] 
kobject_init+0x39/0x50
Feb  6 18:27:32 aphrodite kernel: [87615.163754]  
[_end+128334597/2130180472] :usbcore:hub_thread+0x68d/0xe60
Feb  6 18:27:32 aphrodite kernel: [87615.163782]  
[autoremove_wake_function+0/48] autoremove_wake_function+0x0/0x30
Feb  6 18:27:32 aphrodite kernel: [87615.163819]  
[_end+128332920/2130180472] :usbcore:hub_thread+0x0/0xe60
Feb  6 18:27:32 aphrodite kernel: [87615.163841]  [kthread+75/128] 
kthread+0x4b/0x80
Feb  6 18:27:32 aphrodite kernel: [87615.163859]  [child_rip+10/18] 
child_rip+0xa/0x12
Feb  6 18:27:32 aphrodite kernel: [87615.163883]  [kthread+0/128] 
kthread+0x0/0x80
Feb  6 18:27:32 aphrodite kernel: [87615.163897]  [child_rip+0/18] 
child_rip+0x0/0x12
Feb  6 18:27:32 aphrodite kernel: [87615.163911]
Feb  6 18:27:32 aphrodite kernel: [87615.163920]
Feb  6 18:27:32 aphrodite kernel: [87615.163921] Code: 0f 0b eb fe 0f 1f 40 00 
48 c7 c1 68 9c 45 80 ba 69 01 00 00
Feb  6 18:27:32 aphrodite kernel: [87615.163977] RIP  [dma_map_single+472/544] 
dma_map_single+0x1d8/0x220
Feb  6 18:27:32 aphrodite kernel: [87615.163996]  RSP <ffff88007b1afc00>


The only thing strange I can find is on booting the DomU, I get messages like 
this:
[   51.774675] PCI: Enabling device 0000:00:1d.0 (0000 -> 0001)
[   51.774704] ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 16 (level, low) -> 
IRQ 16
[   51.778271] PCI: Setting latency timer of device 0000:00:1d.0 to 64
[   51.779447] pciback 0000:00:1d.0: Driver tried to write to a read-only 
configuration space field at offset 0xc0, size 2. This may be harmless, but 
if you have problems with your device:
[   51.779455] 1) see permissive attribute in sysfs
[   51.779458] 2) report problems to the xen-devel mailing list along with 
details of your device obtained from lspci.

I tried setting the permissive attributes, like this:

root@hydra:~# cat /etc/xen/xend-pci-permissive.sxp
(unconstrained_dev_ids
     #('0123:4567:89AB:CDEF')
       ('0000:00:1d.0'
        '0000:00:1d.1'
        '0000:00:1d.2'
        '0000:00:1d.3'
        '0000:00:1d.7')

)


I'm stumped.  Any help would be greatly appreciated!

Paul

_______________________________________________
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®.