[CentOS-virt] PCI Passthrough not working

Mon Jul 4 13:29:07 UTC 2016
Francis Greaves <francis at choughs.net>

I am having trouble getting PCI Passthrough to work from Dom0 running CentOS 7 to DomU runnning Debian 8 
I am using Xen 4.6 with CentOS kernel 3.18.34-20.el7.x86_64 on a Dell Poweredge T430. 
I think I have set it all up correctly, but I see no message when putting a USB device into any of the USB slots on the DomU 
There are three other DomUs running, but I have no need of PCI Passthrough set up for them. 

kernel command line on Dom0 from /etc/default/grub 
GRUB_CMDLINE_LINUX="crashkernel=auto intremap=no_x2apic_optout" 
GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=13312M,max:14336M dom0_max_vcpus=6 dom0_vcpus_pin xen-pciback.passthrough=1 irqpoll 
GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT="console=hvc0 earlyprintk=xen" 

lspci on Dom0 filtered for USB 
00:1a.0 USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #2 (rev 05) 
00:1d.0 USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #1 (rev 05) 

lsmod on Dom0 filtered for xen 
xenfs 12978 1 
xen_privcmd 13243 12 xenfs 
xen_pciback 52127 0 
xen_netback 45777 6 
xen_blkback 31807 0 
xen_gntalloc 13144 0 
xen_gntdev 17468 2 
xen_evtchn 13033 5 


config file for DomU 
============================================================== 

# Kernel command line options 
extra = "root=/dev/xvda1 swiotlb=force" 

memory = 2048 
vcpus = 2 
vif = ['mac=00:16:3E:00:00:35, bridge=xenbr5', 'mac=00:16:3E:00:00:36, bridge=xenbr6'] 
disk = ['phy:/dev/xen_vg/metsat_disk,xvda,w', 'phy:/dev/xen_vg/metsat_swap,xvdb,w', 'phy:/dev/xen_vg/metsat_receive,xvdc,w'] 
pci=['00:1a.0,rdm_policy=relaxed,permissive=1,seize=1'] 
on_poweroff = 'destroy' 
on_reboot = 'restart' 
on_crash = 'restart' 
# Run section ============================================================== 
bootloader = "/usr/lib/xen/bin/pygrub" 
============================================================== 

In the Dom0 I get this when booting the DomU, even with irqpoll in the DomU kernel line 

xen_pciback: xen-pciback[0000:00:1a.0] IRQ line is not shared with other domains. Turning ISR off 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: irq 18: nobody cared (try booting with the "irqpoll" option) 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.18.34-20.el7.x86_64 #1 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: Hardware name: Dell Inc. PowerEdge T430/0975F3, BIOS 1.5.4 10/05/2015 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: 0000000000000000 ffff8803bc603d88 ffffffff81653783 ffff8803b223e400 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: ffff8803b223e48c ffff8803bc603db8 ffffffff810c6776 ffff8803bc613340 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: ffff8803b223e400 0000000000000012 0000000000000000 ffff8803bc603e08 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: Call Trace: 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: <IRQ> [<ffffffff81653783>] dump_stack+0x64/0x82 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff810c6776>] __report_bad_irq+0x36/0xd0 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff810c6c86>] note_interrupt+0x226/0x270 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff813e71cc>] ? add_interrupt_randomness+0x3c/0x1f0 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff810c43ec>] handle_irq_event_percpu+0xcc/0x1e0 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff810c453b>] handle_irq_event+0x3b/0x60 

Message from syslogd at myDom0 at Jul 3 11:31:23 ... 
kernelisabling IRQ #18 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff810c709a>] handle_fasteoi_irq+0x7a/0x130 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff810c394b>] generic_handle_irq+0x2b/0x40 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff813a2102>] evtchn_fifo_handle_events+0x162/0x170 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff8139efb0>] __xen_evtchn_do_upcall+0x50/0x90 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff813a0d67>] xen_evtchn_do_upcall+0x37/0x50 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff8165c05e>] xen_do_hypervisor_callback+0x1e/0x40 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: <EOI> [<ffffffff810013aa>] ? xen_hypercall_sched_op+0xa/0x20 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff810013aa>] ? xen_hypercall_sched_op+0xa/0x20 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff8100b330>] ? xen_safe_halt+0x10/0x20 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff8101ea94>] ? default_idle+0x24/0xf0 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff8101f49f>] ? arch_cpu_idle+0xf/0x20 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff810adc92>] ? cpu_startup_entry+0x312/0x3e0 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff816445c7>] ? rest_init+0x77/0x80 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff81d77130>] ? start_kernel+0x4d0/0x4dd 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff81d76a50>] ? set_init_arg+0x55/0x55 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff81d765ee>] ? x86_64_start_reservations+0x2a/0x2c 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff81d7a7cc>] ? xen_start_kernel+0x5a9/0x5b5 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: handlers: 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffff814b0f50>] usb_hcd_irq 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: [<ffffffffa050d3e0>] xen_pcibk_guest_interrupt [xen_pciback] 
Jul 03 11:31:23 myDom0.mynetwork.net kernel: Disabling IRQ #18 

========================================================================= 

on the DomU 

lspci 
00:00.0 USB controller: Intel Corporation Wellsburg USB Enhanced Host Controller #2 (rev 05) 
lsusb 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 

dmesg | grep usb 
[ 3.190569] usbcore: registered new interface driver usbfs 
[ 3.190584] usbcore: registered new interface driver hub 
[ 3.190606] usbcore: registered new device driver usb 
[ 3.220057] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 
[ 3.220062] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 
[ 3.220067] usb usb1: Product: EHCI Host Controller 
[ 3.220070] usb usb1: Manufacturer: Linux 3.2.0-4-686-pae ehci_hcd 
[ 3.220073] usb usb1: SerialNumber: 0000:00:00.0 
[ 3.532049] usb 1-1: new high-speed USB device number 2 using ehci_hcd 
[ 19.088071] usb 1-1: device not accepting address 2, error -110 
[ 19.200069] usb 1-1: new high-speed USB device number 3 using ehci_hcd 
[ 34.756077] usb 1-1: device not accepting address 3, error -110 
[ 34.868111] usb 1-1: new high-speed USB device number 4 using ehci_hcd 
[ 45.300055] usb 1-1: device not accepting address 4, error -110 
[ 45.412076] usb 1-1: new high-speed USB device number 5 using ehci_hcd 
[ 55.844113] usb 1-1: device not accepting address 5, error -110 

lsmod | grep xen 
xen_pcifront 17330 0 
xen_blkfront 17198 6 
xen_netfront 21736 0 

----------------------------------------------------------------------------------------- 

Does anyone have any ideas about this? 
Many thanks 
Francis 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos-virt/attachments/20160704/3e221a0b/attachment-0003.html>