Skip to contentSkip to conversation

Fatal DMA error! Please use 'swiotlb=force' kernel BUG at drivers/pci/xen-iommu.c:227! invalid opcode: 0000 [#1] SMP

pvops-2.6.31.12 Sander Eikelenboom 2 participants 3 messages Mar 11, 2010 – Mar 22, 2010

lore
Share & tools
lore
#0 lore raw

Hi Konrad ,

On this machine i'm using
- xen-3.4.2
- pvops 2.6.31.6 dom0 kernel
- debian stock 2.6.26.2-xen kernels
- All are 64bit, total system mem is 8GB, no hardware iommu present.

I'm passing through several pci devices with great succes (worked stable for several months)
- Soundcard
- 1 PCI and 1 PCI-e USB 2.0 cards used for videograbbing

Now i have tried to passthrough a third USB card, (PCI-e, USB 3.0 in this case), with a new pvops 2.6.31.12 kernel.

But although i specified swiotlb=force, something seems to go wrong with DMA mapping, dmesg from the domU shows the error below. The complete dmesg output is attached.

[    1.139471] EXT3-fs: mounted filesystem with writeback data mode.
[    1.275690] stty used greatest stack depth: 4472 bytes left
[    1.532874] udevd version 125 started
[    1.623120] usb usb1: uevent
[    1.623154] usb 1-0:1.0: uevent
[    2.068935] hub 1-0:1.0: state 7 ports 4 chg 0000 evt 0010
[    2.068952] hub 1-0:1.0: port 4, status 0101, change 0001, 12 Mb/s
[    2.172056] hub 1-0:1.0: debounce: port 4: total 100ms stable 100ms status 0x101
[    2.274050] usb 1-4: new high speed USB device using xhci_hcd and address 0
[    2.285064] dma address needs mapping
[    2.285081] mask: 0xffffffff
[    2.285082]  address: [0x13654d1e0]
[    2.285092] Fatal DMA error! Please use 'swiotlb=force'
[    2.285115] ------------[ cut here ]------------
[    2.285122] kernel BUG at drivers/pci/xen-iommu.c:227!
[    2.285130] invalid opcode: 0000 [#1] SMP
[    2.285139] last sysfs file: /sys/devices/virtual/net/lo/operstate
[    2.285147] CPU 0
[    2.285153] Modules linked in: [last unloaded: scsi_wait_scan]
[    2.285165] Pid: 254, comm: khubd Tainted: G        W  2.6.31.12 #2
[    2.285173] RIP: e030:[<ffffffff81206f5f>]  [<ffffffff81206f5f>] xen_map_page+0x91/0xa0
[    2.285192] RSP: e02b:ffff88000fcef960  EFLAGS: 00010286
[    2.285199] RAX: 0000000000000041 RBX: 00000000ffffffff RCX: 00000000ffff0064
[    2.285207] RDX: 0000000000007474 RSI: ffffffff815400d1 RDI: ffff88000fce02a0
[    2.285216] RBP: ffff88000fcef980 R08: 0000000000000000 R09: ffff88000fc09000
[    2.285224] R10: 0000000000000000 R11: ffff88000fc03200 R12: 000000013654d1e0
[    2.285232] R13: ffff88000fe04880 R14: 0000000000000001 R15: 0000000000000000
[    2.285244] FS:  00007fb57f4a0770(0000) GS:ffffc90000000000(0000) knlGS:0000000000000000
[    2.285254] CS:  e033 DS: 0000 ES: 0000 CR0: 000000008005003b
[    2.285262] CR2: 00007fb57f4a4000 CR3: 000000000f59d000 CR4: 0000000000000660
[    2.285270] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    2.285279] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[    2.285288] Process khubd (pid: 254, threadinfo ffff88000fcee000, task ffff88000fcf6d60)
[    2.285298] Stack:
[    2.285303]  0000000000000100 ffffffff81206ece ffff88000fe04880 ffff88000e88f1e0
[    2.285315] <0> ffff88000fcef9c0 ffffffff8135c5ab 0000000000000008 ffff88000fcefb50
[    2.285331] <0> 0000000000000200 ffff88000e4f8f00 ffff88000fcff000 0000000000000010
[    2.285350] Call Trace:
[    2.285358]  [<ffffffff81206ece>] ? xen_map_page+0x0/0xa0
[    2.285368]  [<ffffffff8135c5ab>] dma_map_single_attrs+0x7d/0x97
[    2.285378]  [<ffffffff8135cdda>] usb_hcd_submit_urb+0xaa/0x9b8
[    2.285388]  [<ffffffff8100ed52>] ? check_events+0x12/0x20
[    2.285398]  [<ffffffff8100ed3f>] ? xen_restore_fl_direct_end+0x0/0x1
[    2.285407]  [<ffffffff8100c109>] ? xen_mc_flush+0x162/0x187
[    2.285416]  [<ffffffff8100ed3f>] ? xen_restore_fl_direct_end+0x0/0x1
[    2.285426]  [<ffffffff810bb600>] ? shmem_delete_inode+0xe0/0xff
[    2.285437]  [<ffffffff8100b485>] ? xen_end_context_switch+0x19/0x1d
[    2.285447]  [<ffffffff81011688>] ? __switch_to+0x18d/0x2d9
[    2.285456]  [<ffffffff8135dcb2>] usb_submit_urb+0x306/0x323
[    2.285465]  [<ffffffff8100ed52>] ? check_events+0x12/0x20
[    2.285474]  [<ffffffff8135efad>] usb_start_wait_urb+0x55/0x165
[    2.285485]  [<ffffffff810dda6f>] ? __kmalloc+0x134/0x146
[    2.285494]  [<ffffffff8135e04a>] ? usb_init_urb+0x22/0x33
[    2.285502]  [<ffffffff8135f300>] usb_control_msg+0x115/0x137
[    2.285512]  [<ffffffff8100ed52>] ? check_events+0x12/0x20
[    2.285520]  [<ffffffff813603b0>] usb_get_descriptor+0x71/0xa1
[    2.285530]  [<ffffffff810dcc69>] ? kmem_cache_alloc+0x8e/0xef
[    2.285539]  [<ffffffff81360478>] usb_get_device_descriptor+0x98/0xc4
[    2.285549]  [<ffffffff81357bdd>] hub_port_init+0x5cc/0x773
[    2.285558]  [<ffffffff8135a99d>] hub_thread+0xbff/0x145a
[    2.285568]  [<ffffffff8104005e>] ? dequeue_entity+0x1b/0x1df
[    2.285578]  [<ffffffff81061ba4>] ? autoremove_wake_function+0x0/0x38
[    2.285588]  [<ffffffff81359d9e>] ? hub_thread+0x0/0x145a
[    2.285596]  [<ffffffff81061810>] kthread+0x8f/0x97
[    2.285605]  [<ffffffff81013caa>] child_rip+0xa/0x20
[    2.285613]  [<ffffffff81012e67>] ? int_ret_from_sys_call+0x7/0x1b
[    2.285622]  [<ffffffff8101361d>] ? retint_restore_args+0x5/0x6
[    2.285631]  [<ffffffff81013ca0>] ? child_rip+0x0/0x20
[    2.285638] Code: 70 81 31 c0 e8 72 cb 33 00 4c 89 e2 48 89 de 48 c7 c7 c1 d0 70 81 31 c0 e8 5e cb 33 00 48 c7 c7 e3 d0 70 81 31 c0 e8 50 cb 33 00 <0f> 0b eb fe 5a 5b 4c 89 e0 41 5c 41 5d c9 c3 55 48 89 f8 25 ff
[    2.285745] RIP  [<ffffffff81206f5f>] xen_map_page+0x91/0xa0
[    2.285755]  RSP <ffff88000fcef960>
[    2.285763] ---[ end trace 4eaa2a86a8e2da24 ]---
[    2.285779] khubd used greatest stack depth: 3688 bytes left
[    2.541731] Adding 524280k swap on /dev/xvda1.  Priority:-1 extents:1 across:524280k SS
[    2.588323] EXT3 FS on xvda2, internal journal
[   13.628035] eth0: no IPv6 routers present

tv2:~#

Signature · 2 lines
Best regards,
 Sander                          mailto:[email protected]
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.31.12 (root@tv2) (gcc version 4.3.2 (Debian 4.3.2-1.1) ) #2 SMP Thu Mar 11 10:06:52 UTC 2010
[    0.000000] Command line: root=/dev/xvda2 ro swiotlb=force
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Centaur CentaurHauls
[    0.000000] ACPI in unprivileged domain disabled
[    0.000000] released 0 pages of unused memory
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  Xen: 0000000000000000 - 00000000000a0000 (usable)
[    0.000000]  Xen: 00000000000a0000 - 0000000000100000 (reserved)
[    0.000000]  Xen: 0000000000100000 - 0000000010000000 (usable)
[    0.000000] DMI not present or invalid.
[    0.000000] last_pfn = 0x10000 max_arch_pfn = 0x400000000
[    0.000000] e820 update range: 0000000000001000 - 0000000000006000 (usable) ==> (reserved)
[    0.000000] Scanning 1 areas for low memory corruption
[    0.000000] modified physical RAM map:
[    0.000000]  modified: 0000000000000000 - 0000000000001000 (usable)
[    0.000000]  modified: 0000000000001000 - 0000000000006000 (reserved)
[    0.000000]  modified: 0000000000006000 - 00000000000a0000 (usable)
[    0.000000]  modified: 00000000000a0000 - 0000000000100000 (reserved)
[    0.000000]  modified: 0000000000100000 - 0000000010000000 (usable)
[    0.000000] initial memory mapped : 0 - 20000000
[    0.000000] init_memory_mapping: 0000000000000000-0000000010000000
[    0.000000]  0000000000 - 0010000000 page 4k
[    0.000000] kernel direct mapping tables up to 10000000 @ 8000-8a000
[    0.000000] RAMDISK: 01a76000 - 01e33000
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at 0000000000000000-0000000010000000
[    0.000000] Bootmem setup node 0 0000000000000000-0000000010000000
[    0.000000]   NODE_DATA [0000000000074000 - 0000000000078fff]
[    0.000000]   bootmap [0000000000079000 -  000000000007afff] pages 2
[    0.000000] (7 early reservations) ==> bootmem [0000000000 - 0010000000]
[    0.000000]   #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
[    0.000000]   #1 [0001eb6000 - 0001ec9000]   XEN PAGETABLES ==> [0001eb6000 - 0001ec9000]
[    0.000000]   #2 [0000006000 - 0000008000]       TRAMPOLINE ==> [0000006000 - 0000008000]
[    0.000000]   #3 [0001000000 - 0001a55de4]    TEXT DATA BSS ==> [0001000000 - 0001a55de4]
[    0.000000]   #4 [0001a76000 - 0001e33000]          RAMDISK ==> [0001a76000 - 0001e33000]
[    0.000000]   #5 [0001e33000 - 0001eb6000]   XEN START INFO ==> [0001e33000 - 0001eb6000]
[    0.000000]   #6 [0000008000 - 0000074000]          PGTABLE ==> [0000008000 - 0000074000]
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000000 -> 0x00001000
[    0.000000]   DMA32    0x00001000 -> 0x00100000
[    0.000000]   Normal   0x00100000 -> 0x00100000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[3] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00000001
[    0.000000]     0: 0x00000006 -> 0x000000a0
[    0.000000]     0: 0x00000100 -> 0x00010000
[    0.000000] On node 0 totalpages: 65435
[    0.000000]   DMA zone: 56 pages used for memmap
[    0.000000]   DMA zone: 111 pages reserved
[    0.000000]   DMA zone: 3828 pages, LIFO batch:0
[    0.000000]   DMA32 zone: 840 pages used for memmap
[    0.000000]   DMA32 zone: 60600 pages, LIFO batch:15
[    0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs
[    0.000000] No local APIC present
[    0.000000] APIC: disable apic facility
[    0.000000] nr_irqs_gsi: 16
[    0.000000] PM: Registered nosave memory: 0000000000001000 - 0000000000006000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 0000000000100000
[    0.000000] Allocating PCI resources starting at 10000000 (gap: 10000000:f0000000)
[    0.000000] NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:1 nr_node_ids:1
[    0.000000] PERCPU: Allocated 22 4k pages, static data 88672 bytes
[    0.000000] trying to map vcpu_info 0 at ffffc9000000b020, mfn 13dbbf, offset 32
[    0.000000] cpu 0 using vcpu_info at ffffc9000000b020
[    0.000000] Xen: using vcpu_info placement
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 64428
[    0.000000] Policy zone: DMA32
[    0.000000] Kernel command line: root=/dev/xvda2 ro swiotlb=force
[    0.000000] PID hash table entries: 1024 (order: 10, 8192 bytes)
[    0.000000] Initializing CPU#0
[    0.000000] Checking aperture...
[    0.000000] No AGP bridge found
[    0.000000] Calgary: detecting Calgary via BIOS EBDA area
[    0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing!
[    0.000000] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    0.000000] Placing 64MB software IO TLB between ffff88000264e000 - ffff88000664e000
[    0.000000] software IO TLB at phys 0x264e000 - 0x664e000
[    0.000000] Memory: 176548k/262144k available (5425k kernel code, 404k absent, 85192k reserved, 3369k data, 644k init)
[    0.000000] SLUB: Genslabs=14, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:4352 nr_irqs:256
[    0.000000] Detected 2500.000 MHz processor.
[    0.000999] Console: colour dummy device 80x25
[    0.000999] console [tty0] enabled
[    0.000999] console [hvc0] enabled
[    0.000999] Xen: using vcpuop timer interface
[    0.000999] installing Xen timer for CPU 0
[    0.000999]   alloc irq_desc for 255 on node 0
[    0.000999]   alloc kstat_irqs on node 0
[    0.000999] xen: vcpu_time_info placement not supported
[    0.000999] Calibrating delay loop (skipped), value calculated using timer frequency.. 5000.00 BogoMIPS (lpj=2500000)
[    0.000999] Security Framework initialized
[    0.000999] SELinux:  Initializing.
[    0.000999] SELinux:  Starting in permissive mode
[    0.000999] Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
[    0.000999] Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.000999] Mount-cache hash table entries: 256
[    0.000999] Initializing cgroup subsys ns
[    0.000999] Initializing cgroup subsys cpuacct
[    0.000999] Initializing cgroup subsys freezer
[    0.000999] CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
[    0.000999] CPU: L2 Cache: 512K (64 bytes/line)
[    0.000999] CPU 0/0x0 -> Node 0
[    0.000999] tseg: 0000000000
[    0.000999] CPU: Physical Processor ID: 0
[    0.000999] CPU: Processor Core ID: 0
[    0.000999] Performance Counters: AMD PMU driver.
[    0.000999] ------------[ cut here ]------------
[    0.000999] WARNING: at arch/x86/kernel/apic/apic.c:247 native_apic_write_dummy+0x30/0x3c()
[    0.000999] Modules linked in:
[    0.000999] Pid: 0, comm: swapper Not tainted 2.6.31.12 #2
[    0.000999] Call Trace:
[    0.000999]  [<ffffffff810279b7>] ? native_apic_write_dummy+0x30/0x3c
[    0.000999]  [<ffffffff8104c780>] warn_slowpath_common+0x77/0xa4
[    0.000999]  [<ffffffff8104c7bc>] warn_slowpath_null+0xf/0x11
[    0.000999]  [<ffffffff810279b7>] native_apic_write_dummy+0x30/0x3c
[    0.000999]  [<ffffffff8101db77>] perf_counters_lapic_init+0x2e/0x30
[    0.000999]  [<ffffffff818b6cfc>] init_hw_perf_counters+0x2f7/0x394
[    0.000999]  [<ffffffff8153dc23>] ? identify_cpu+0x2fb/0x306
[    0.000999]  [<ffffffff818b69d6>] identify_boot_cpu+0x3c/0x3e
[    0.000999]  [<ffffffff818b69e1>] check_bugs+0x9/0x2d
[    0.000999]  [<ffffffff818ae724>] start_kernel+0x377/0x38c
[    0.000999]  [<ffffffff818add1f>] x86_64_start_reservations+0xaa/0xae
[    0.000999]  [<ffffffff818b1a2f>] xen_start_kernel+0x5db/0x5e2
[    0.000999] ---[ end trace 4eaa2a86a8e2da22 ]---
[    0.000999] ... version:                 0
[    0.000999] ... bit width:               48
[    0.000999] ... generic counters:        4
[    0.000999] ... value mask:              0000ffffffffffff
[    0.000999] ... max period:              00007fffffffffff
[    0.000999] ... fixed-purpose counters:  0
[    0.000999] ... counter mask:            000000000000000f
[    0.000999] SMP alternatives: switching to UP code
[    0.002999] Freeing SMP alternatives: 42k freed
[    0.003085]   alloc irq_desc for 254 on node 0
[    0.003089]   alloc kstat_irqs on node 0
[    0.003099]   alloc irq_desc for 253 on node 0
[    0.003102]   alloc kstat_irqs on node 0
[    0.003108]   alloc irq_desc for 252 on node 0
[    0.003110]   alloc kstat_irqs on node 0
[    0.003115]   alloc irq_desc for 251 on node 0
[    0.003118]   alloc kstat_irqs on node 0
[    0.003238] Brought up 1 CPUs
[    0.003448] khelper used greatest stack depth: 6248 bytes left
[    0.004265] Booting paravirtualized kernel on Xen
[    0.004290] Xen version: 3.4.2 (preserve-AD)
[    0.005011] Grant tables using version 1 layout.
[    0.005048] Grant table initialized
[    0.025334] Time: 165:165:165  Date: 165/165/65
[    0.025457] NET: Registered protocol family 16
[    0.025828]   alloc irq_desc for 250 on node 0
[    0.025831]   alloc kstat_irqs on node 0
[    0.025897] xenbus_probe wake_waiting
[    0.025908] xenbus_probe_init ok
[    0.026889] PCI: setting up Xen PCI frontend stub
[    0.028760] khelper used greatest stack depth: 5960 bytes left
[    0.040353] bio: create slab <bio-0> at 0
[    0.040535] ACPI: Interpreter disabled.
[    0.043277] xenbus_probe_backend_init bus registered ok
[    0.043290] xenbus_probe_devices backend
[    0.043304] xenbus_probe_devices failed xenbus_directory
[    0.043304] backend_probe_and_watch devices probed ok
[    0.043304] backend_probe_and_watch watch add ok ok
[    0.043304] backend_probe_and_watch all done
[    0.043304] xenbus_probe_frontend_init bus registered ok
[    0.043304] xenbus_probe_devices device
[    0.044019] xenbus_probe_devices 1/4 vbd
[    0.044019] xenbus_probe_device_type type vbd
[    0.044025] xenbus_probe_device_type 1/2 51713
[    0.044073] xenbus_probe_device_type 2/2 51714
[    0.044087] xenbus_probe_device_type done
[    0.044087] xenbus_probe_devices 2/4 vif
[    0.044087] xenbus_probe_device_type type vif
[    0.044092] xenbus_probe_device_type 1/1 0
[    0.044092] xenbus_probe_device_type done
[    0.044092] xenbus_probe_devices 3/4 pci
[    0.044092] xenbus_probe_device_type type pci
[    0.044092] xenbus_probe_device_type 1/1 0
[    0.044092] xenbus_probe_device_type done
[    0.044092] xenbus_probe_devices 4/4 console
[    0.044092] xenbus_probe_device_type type console
[    0.044092] xenbus_probe_device_type 1/1 0
[    0.044092] xenbus_probe_device_type done
[    0.044092] xenbus_probe_devices done
[    0.044092] frontend_probe_and_watch devices probed ok
[    0.045020] frontend_probe_and_watch watch add ok ok
[    0.045022] frontend_probe_and_watch all done
[    0.045029] xen_balloon: Initialising balloon driver with page order 0.
[    0.045386] SCSI subsystem initialized
[    0.045448] libata version 3.00 loaded.
[    0.046091] usbcore: registered new interface driver usbfs
[    0.046167] usbcore: registered new interface driver hub
[    0.046256] usbcore: registered new device driver usb
[    0.046695] PCI: System does not support PCI
[    0.046992] PCI: System does not support PCI
[    0.047511] cfg80211: Using static regulatory domain info
[    0.047550] cfg80211: Regulatory domain: US
[    0.047559] 	(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    0.047570] 	(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
[    0.047579] 	(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[    0.047587] 	(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[    0.047596] 	(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[    0.047604] 	(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[    0.047612] 	(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
[    0.047644] cfg80211: Calling CRDA for country: US
[    0.047773] NetLabel: Initializing
[    0.047783] NetLabel:  domain hash size = 128
[    0.047789] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.047815] NetLabel:  unlabeled traffic allowed by default
[    0.048159] Xen: Initializing Xen DMA ops
[    0.049006] Switched to high resolution mode on CPU 0
[    0.050222] pnp: PnP ACPI: disabled
[    0.051304] NET: Registered protocol family 2
[    0.051396] IP route cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.051669] TCP established hash table entries: 8192 (order: 5, 131072 bytes)
[    0.051766] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[    0.051826] TCP: Hash tables configured (established 8192 bind 8192)
[    0.051838] TCP reno registered
[    0.051914] NET: Registered protocol family 1
[    0.051993] Trying to unpack rootfs image as initramfs...
[    0.057784] Freeing initrd memory: 3828k freed
[    0.060474] platform rtc_cmos: registered platform RTC device (no PNP device found)
[    0.061333] microcode: no support for this CPU vendor
[    0.061343] Scanning for low memory corruption every 60 seconds
[    0.061733] audit: initializing netlink socket (disabled)
[    0.061755] type=2000 audit(1268303301.396:1): initialized
[    0.069436] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.073780] VFS: Disk quotas dquot_6.5.2
[    0.073909] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.075427] msgmni has been set to 352
[    0.075593] SELinux:  Registering netfilter hooks
[    0.076363] alg: No test for stdrng (krng)
[    0.076576] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.076589] io scheduler noop registered
[    0.076596] io scheduler anticipatory registered
[    0.076603] io scheduler deadline registered
[    0.076713] io scheduler cfq registered (default)
[    0.076923] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    0.077308]   alloc irq_desc for 249 on node 0
[    0.077311]   alloc kstat_irqs on node 0
[    0.084079] pcifront pci-0: Installing PCI frontend
[    0.084158] pcifront pci-0: Creating PCI Frontend Bus 0000:05
[    0.084462] pci 0000:05:00.0: reg 10 64bit mmio: [0xfdbfe000-0xfdbfffff]
[    0.090058] pciback 0000:05:00.0: probing...
[    0.090584] Event-channel device installed.
[    0.097042] blktap_device_init: blktap device major 253
[    0.097063] blktap_ring_init: blktap ring major: 251
[    0.098344] registering netback
[    0.104181]   alloc irq_desc for 248 on node 0
[    0.104185]   alloc kstat_irqs on node 0
[    0.104945] Non-volatile memory driver v1.3
[    0.104958] Linux agpgart interface v0.103
[    0.105339] [drm] Initialized drm 1.1.0 20060810
[    0.105415] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.108851] brd: module loaded
[    0.110561] loop: module loaded
[    0.111215]   alloc irq_desc for 247 on node 0
[    0.111219]   alloc kstat_irqs on node 0
[    0.119196]   alloc irq_desc for 246 on node 0
[    0.119201]   alloc kstat_irqs on node 0
[    0.122031] blkfront: xvda1: barriers enabled
[    0.128598] input: Macintosh mouse button emulation as /devices/virtual/input/input0
[    0.129387] Intel(R) PRO/1000 Network Driver - version 7.3.21-k3-NAPI
[    0.129398] Copyright (c) 1999-2006 Intel Corporation.
[    0.129476] e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
[    0.129485] e100: Copyright(c) 1999-2006 Intel Corporation
[    0.129611] sky2 driver version 1.23
[    0.129743] Initialising Xen virtual ethernet driver.
[    0.250863] blkfront: xvda2: barriers enabled
[    0.252180]   alloc irq_desc for 245 on node 0
[    0.252184]   alloc kstat_irqs on node 0
[    0.252297] console [netcon0] enabled
[    0.252308] netconsole: network logging started
[    0.252548] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.252559] ehci_hcd: block sizes: qh 192 qtd 96 itd 192 sitd 96
[    0.252630] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.252640] ohci_hcd: block sizes: ed 80 td 96
[    0.252706] uhci_hcd: USB Universal Host Controller Interface driver
[    0.252965] xhci_hcd 0000:05:00.0: enabling device (0000 -> 0002)
[    0.253005] xhci_hcd 0000:05:00.0: Xen PCI enabling IRQ: 16
[    0.253005]   alloc irq_desc for 16 on node 0
[    0.253005]   alloc kstat_irqs on node 0
[    0.253005] xhci_hcd 0000:05:00.0: setting latency timer to 64
[    0.253005] xhci_hcd 0000:05:00.0: xHCI Host Controller
[    0.264083] drivers/usb/core/inode.c: creating file 'devices'
[    0.264090] drivers/usb/core/inode.c: creating file '001'
[    0.264252] xhci_hcd 0000:05:00.0: new USB bus registered, assigned bus number 1
[    0.265103] xhci_hcd 0000:05:00.0: irq 16, io mem 0xfdbfe000
[    0.265154] usb usb1: config 1 interface 0 altsetting 0 endpoint 0x81 has no SuperSpeed companion descriptor
[    0.265170] usb usb1: default language 0x0409
[    0.265181] usb usb1: udev 1, busnum 1, minor = 0
[    0.265184] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.265193] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.265203] usb usb1: Product: xHCI Host Controller
[    0.265210] usb usb1: Manufacturer: Linux 2.6.31.12 xhci_hcd
[    0.265217] usb usb1: SerialNumber: 0000:05:00.0
[    0.265281] usb usb1: uevent
[    0.265386] usb usb1: usb_probe_device
[    0.265389] usb usb1: configuration #1 chosen from 1 choice
[    0.265401] xHCI xhci_add_endpoint called for root hub
[    0.265404] xHCI xhci_check_bandwidth called for root hub
[    0.265412] usb usb1: adding 1-0:1.0 (config #1, interface 0)
[    0.265430] usb 1-0:1.0: uevent
[    0.265491] hub 1-0:1.0: usb_probe_interface
[    0.265494] hub 1-0:1.0: usb_probe_interface - got id
[    0.265497] hub 1-0:1.0: USB hub found
[    0.265530] hub 1-0:1.0: 4 ports detected
[    0.265537] hub 1-0:1.0: standalone hub
[    0.265539] hub 1-0:1.0: individual port power switching
[    0.265542] hub 1-0:1.0: individual port over-current protection
[    0.265545] hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
[    0.265548] hub 1-0:1.0: power on to power good time: 20ms
[    0.265555] hub 1-0:1.0: local power source is good
[    0.265558] hub 1-0:1.0: enabling power on all ports
[    0.265600] drivers/usb/core/inode.c: creating file '001'
[    0.265799] usbcore: registered new interface driver usblp
[    0.265810] Initializing USB Mass Storage driver...
[    0.265883] usbcore: registered new interface driver usb-storage
[    0.265894] USB Mass Storage support registered.
[    0.265966] usbcore: registered new interface driver libusual
[    0.266262] PNP: No PS/2 controller found. Probing ports directly.
[    0.267006] i8042.c: No controller found.
[    0.267356] mice: PS/2 mouse device common for all mice
[    0.267824] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
[    0.267903] khelper used greatest stack depth: 5936 bytes left
[    0.268591] device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: [email protected]
[    0.268721] cpuidle: using governor ladder
[    0.268729] cpuidle: using governor menu
[    0.271330] usbcore: registered new interface driver hiddev
[    0.271403] usbcore: registered new interface driver usbhid
[    0.271412] usbhid: v2.6:USB HID core driver
[    0.271507] Advanced Linux Sound Architecture Driver Version 1.0.20.
[    0.274662] modprobe used greatest stack depth: 5808 bytes left
[    0.280272] ALSA device list:
[    0.280285]   No soundcards found.
[    0.280350] Netfilter messages via NETLINK v0.30.
[    0.280378] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[    0.281184] ctnetlink v0.93: registering with nfnetlink.
[    0.281704] ip_tables: (C) 2000-2006 Netfilter Core Team
[    0.281738] TCP cubic registered
[    0.281745] Initializing XFRM netlink socket
[    0.282147] NET: Registered protocol family 10
[    0.283235] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    0.283298] IPv6 over IPv4 tunneling driver
[    0.283910] NET: Registered protocol family 17
[    0.284204] RPC: Registered udp transport module.
[    0.284214] RPC: Registered tcp transport module.
[    0.284511] PM: Resume from disk failed.
[    0.284528] registered taskstats version 1
[    0.284560] XENBUS: Device with no driver: device/console/0
[    0.284579]   Magic number: 1:252:3141
[    0.284714] Freeing unused kernel memory: 644k freed
[    0.285185] Write protecting the kernel read-only data: 7788k
[    0.325264] all_generic_ide used greatest stack depth: 5776 bytes left
[    0.367628] hub 1-0:1.0: port 4: status 0101 change 0001
[    0.459632] usb usb1: uevent
[    0.459664] usb 1-0:1.0: uevent
[    0.467181] hub 1-0:1.0: state 7 ports 4 chg 0010 evt 0000
[    0.467204] hub 1-0:1.0: port 4, status 0100, change 0001, 12 Mb/s
[    0.571050] hub 1-0:1.0: debounce: port 4: total 100ms stable 100ms status 0x100
[    0.654113] vol_id used greatest stack depth: 5216 bytes left
[    1.131285] PM: Starting manual resume from disk
[    1.131299] PM: Resume from partition 202:1
[    1.131301] PM: Checking hibernation image.
[    1.131487] PM: Resume from disk failed.
[    1.139444] kjournald starting.  Commit interval 5 seconds
[    1.139471] EXT3-fs: mounted filesystem with writeback data mode.
[    1.275690] stty used greatest stack depth: 4472 bytes left
[    1.532874] udevd version 125 started
[    1.623120] usb usb1: uevent
[    1.623154] usb 1-0:1.0: uevent
[    2.068935] hub 1-0:1.0: state 7 ports 4 chg 0000 evt 0010
[    2.068952] hub 1-0:1.0: port 4, status 0101, change 0001, 12 Mb/s
[    2.172056] hub 1-0:1.0: debounce: port 4: total 100ms stable 100ms status 0x101
[    2.274050] usb 1-4: new high speed USB device using xhci_hcd and address 0
[    2.285064] dma address needs mapping
[    2.285081] mask: 0xffffffff
[    2.285082]  address: [0x13654d1e0]
[    2.285092] Fatal DMA error! Please use 'swiotlb=force'
[    2.285115] ------------[ cut here ]------------
[    2.285122] kernel BUG at drivers/pci/xen-iommu.c:227!
[    2.285130] invalid opcode: 0000 [#1] SMP 
[    2.285139] last sysfs file: /sys/devices/virtual/net/lo/operstate
[    2.285147] CPU 0 
[    2.285153] Modules linked in: [last unloaded: scsi_wait_scan]
[    2.285165] Pid: 254, comm: khubd Tainted: G        W  2.6.31.12 #2 
[    2.285173] RIP: e030:[<ffffffff81206f5f>]  [<ffffffff81206f5f>] xen_map_page+0x91/0xa0
[    2.285192] RSP: e02b:ffff88000fcef960  EFLAGS: 00010286
[    2.285199] RAX: 0000000000000041 RBX: 00000000ffffffff RCX: 00000000ffff0064
[    2.285207] RDX: 0000000000007474 RSI: ffffffff815400d1 RDI: ffff88000fce02a0
[    2.285216] RBP: ffff88000fcef980 R08: 0000000000000000 R09: ffff88000fc09000
[    2.285224] R10: 0000000000000000 R11: ffff88000fc03200 R12: 000000013654d1e0
[    2.285232] R13: ffff88000fe04880 R14: 0000000000000001 R15: 0000000000000000
[    2.285244] FS:  00007fb57f4a0770(0000) GS:ffffc90000000000(0000) knlGS:0000000000000000
[    2.285254] CS:  e033 DS: 0000 ES: 0000 CR0: 000000008005003b
[    2.285262] CR2: 00007fb57f4a4000 CR3: 000000000f59d000 CR4: 0000000000000660
[    2.285270] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    2.285279] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[    2.285288] Process khubd (pid: 254, threadinfo ffff88000fcee000, task ffff88000fcf6d60)
[    2.285298] Stack:
[    2.285303]  0000000000000100 ffffffff81206ece ffff88000fe04880 ffff88000e88f1e0
[    2.285315] <0> ffff88000fcef9c0 ffffffff8135c5ab 0000000000000008 ffff88000fcefb50
[    2.285331] <0> 0000000000000200 ffff88000e4f8f00 ffff88000fcff000 0000000000000010
[    2.285350] Call Trace:
[    2.285358]  [<ffffffff81206ece>] ? xen_map_page+0x0/0xa0
[    2.285368]  [<ffffffff8135c5ab>] dma_map_single_attrs+0x7d/0x97
[    2.285378]  [<ffffffff8135cdda>] usb_hcd_submit_urb+0xaa/0x9b8
[    2.285388]  [<ffffffff8100ed52>] ? check_events+0x12/0x20
[    2.285398]  [<ffffffff8100ed3f>] ? xen_restore_fl_direct_end+0x0/0x1
[    2.285407]  [<ffffffff8100c109>] ? xen_mc_flush+0x162/0x187
[    2.285416]  [<ffffffff8100ed3f>] ? xen_restore_fl_direct_end+0x0/0x1
[    2.285426]  [<ffffffff810bb600>] ? shmem_delete_inode+0xe0/0xff
[    2.285437]  [<ffffffff8100b485>] ? xen_end_context_switch+0x19/0x1d
[    2.285447]  [<ffffffff81011688>] ? __switch_to+0x18d/0x2d9
[    2.285456]  [<ffffffff8135dcb2>] usb_submit_urb+0x306/0x323
[    2.285465]  [<ffffffff8100ed52>] ? check_events+0x12/0x20
[    2.285474]  [<ffffffff8135efad>] usb_start_wait_urb+0x55/0x165
[    2.285485]  [<ffffffff810dda6f>] ? __kmalloc+0x134/0x146
[    2.285494]  [<ffffffff8135e04a>] ? usb_init_urb+0x22/0x33
[    2.285502]  [<ffffffff8135f300>] usb_control_msg+0x115/0x137
[    2.285512]  [<ffffffff8100ed52>] ? check_events+0x12/0x20
[    2.285520]  [<ffffffff813603b0>] usb_get_descriptor+0x71/0xa1
[    2.285530]  [<ffffffff810dcc69>] ? kmem_cache_alloc+0x8e/0xef
[    2.285539]  [<ffffffff81360478>] usb_get_device_descriptor+0x98/0xc4
[    2.285549]  [<ffffffff81357bdd>] hub_port_init+0x5cc/0x773
[    2.285558]  [<ffffffff8135a99d>] hub_thread+0xbff/0x145a
[    2.285568]  [<ffffffff8104005e>] ? dequeue_entity+0x1b/0x1df
[    2.285578]  [<ffffffff81061ba4>] ? autoremove_wake_function+0x0/0x38
[    2.285588]  [<ffffffff81359d9e>] ? hub_thread+0x0/0x145a
[    2.285596]  [<ffffffff81061810>] kthread+0x8f/0x97
[    2.285605]  [<ffffffff81013caa>] child_rip+0xa/0x20
[    2.285613]  [<ffffffff81012e67>] ? int_ret_from_sys_call+0x7/0x1b
[    2.285622]  [<ffffffff8101361d>] ? retint_restore_args+0x5/0x6
[    2.285631]  [<ffffffff81013ca0>] ? child_rip+0x0/0x20
[    2.285638] Code: 70 81 31 c0 e8 72 cb 33 00 4c 89 e2 48 89 de 48 c7 c7 c1 d0 70 81 31 c0 e8 5e cb 33 00 48 c7 c7 e3 d0 70 81 31 c0 e8 50 cb 33 00 <0f> 0b eb fe 5a 5b 4c 89 e0 41 5c 41 5d c9 c3 55 48 89 f8 25 ff 
[    2.285745] RIP  [<ffffffff81206f5f>] xen_map_page+0x91/0xa0
[    2.285755]  RSP <ffff88000fcef960>
[    2.285763] ---[ end trace 4eaa2a86a8e2da24 ]---
[    2.285779] khubd used greatest stack depth: 3688 bytes left
[    2.541731] Adding 524280k swap on /dev/xvda1.  Priority:-1 extents:1 across:524280k SS
[    2.588323] EXT3 FS on xvda2, internal journal
[   13.628035] eth0: no IPv6 routers present

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 8 lines · Sander Eikelenboom

Hi Konrad ,

On this machine i'm using
- xen-3.4.2
- pvops 2.6.31.6 dom0 kernel
- debian stock 2.6.26.2-xen kernels
- All are 64bit, total system mem is 8GB, no hardware iommu present.

Quoted 7 lines

I'm passing through several pci devices with great succes (worked stable for several months)
- Soundcard
- 1 PCI and 1 PCI-e USB 2.0 cards used for videograbbing

Now i have tried to passthrough a third USB card, (PCI-e, USB 3.0 in this case), with a new pvops 2.6.31.12 kernel.

Hmm.. That is mostly unexpected.

Quoted 5 lines

But although i specified swiotlb=force, something seems to go wrong with DMA mapping, dmesg from the domU shows the error below. The complete dmesg output is attached.

Quoted 15 lines
[    1.139471] EXT3-fs: mounted filesystem with writeback data mode.
[    1.275690] stty used greatest stack depth: 4472 bytes left
[    1.532874] udevd version 125 started
[    1.623120] usb usb1: uevent
[    1.623154] usb 1-0:1.0: uevent
[    2.068935] hub 1-0:1.0: state 7 ports 4 chg 0000 evt 0010
[    2.068952] hub 1-0:1.0: port 4, status 0101, change 0001, 12 Mb/s
[    2.172056] hub 1-0:1.0: debounce: port 4: total 100ms stable 100ms status 0x101
[    2.274050] usb 1-4: new high speed USB device using xhci_hcd and address 0
[    2.285064] dma address needs mapping
[    2.285081] mask: 0xffffffff
[    2.285082]  address: [0x13654d1e0]
[    2.285092] Fatal DMA error! Please use 'swiotlb=force'
[    2.285115] ------------[ cut here ]------------
[    2.285122] kernel BUG at drivers/pci/xen-iommu.c:227!

That shouldn't be there anymore. It looks like the SWIOTLB is initialized, _but_ the other less useful IOMMU is used instead. Let me dig in this and come back to you next week. In the internim, 2.6.32 (xen/next) should be working much better - try that.

#2 lore raw
In reply to Sander Eikelenboom
Quoted 14 lines · Sander Eikelenboom

Hi Konrad ,

On this machine i'm using
- xen-3.4.2
- pvops 2.6.31.6 dom0 kernel
- debian stock 2.6.26.2-xen kernels
- All are 64bit, total system mem is 8GB, no hardware iommu present.

I'm passing through several pci devices with great succes (worked stable for several months)
- Soundcard
- 1 PCI and 1 PCI-e USB 2.0 cards used for videograbbing

Quoted 4 lines

Now i have tried to passthrough a third USB card, (PCI-e, USB 3.0 in this case), with a new pvops 2.6.31.12 kernel.

But although i specified swiotlb=force, something seems to go wrong with DMA mapping, dmesg from the domU shows the error below. The complete dmesg output is attached.

Ugh. There is one more parameter you need to add, that is 'iommu=soft'.

That 'use swiotlb=force' nees to be fixed. Thanks for spotting it.