From: Sander Eikelenboom Subject: Xen-unstable: pci-passthrough of device using MSI-X interrupts not working after commit x86/MSI: track host and guest masking separately Date: Wed, 24 Jun 2015 21:38:17 +0200 Message-ID: <917517816.20150624213817@eikelenboom.it> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , andrew.cooper3@citrix.com Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Hi Jan / Andrew, I'm having some trouble with a xhci controller passed through with pci-passthrough to one of my HVM guests. It uses MSI-X for interrupts, a bisection turned up the following commit: ad28e42bd1d28d746988ed71654e8aa670629753 is the first bad commit commit ad28e42bd1d28d746988ed71654e8aa670629753 Author: Jan Beulich Date: Fri Jun 19 10:59:53 2015 +0200 x86/MSI: track host and guest masking separately In particular we want to avoid losing track of our own intention to have an entry masked. Physical unmasking now happens only when both host and guest requested so. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Although from a first glance it looks as if the controller is correctly initialize during the boot of the HVM guest (no worrying messages in dmesg yet). It utterly fails a simple "lsusb" this results in the hang pasted below. Other devices i passthrough which use legacy or MSI interrupts seem to be unaffected. Please say so if you need any specific output from Xen debug keys or anything else ! -- Sander The lspci from witin the guest (doesn't differ between good or bad): 00:05.0 USB controller [0c03]: NEC Corporation uPD720200 USB 3.0 Host Controller [1033:0194] (rev 03) (prog-if 30 [XHCI]) Subsystem: ASUSTeK Computer Inc. P8P67 Deluxe Motherboard [1043:8413] Physical Slot: 5 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 240.805612] kworker/3:1 D ffff88003cdbbb38 0 853 2 0x00000000 [ 240.817493] Workqueue: usb_hub_wq hub_event [ 240.824566] ffff88003cdbbb38 00000000000040d0 ffff88003dafe8d0 0000000000030010 [ 240.846212] ffff88003cdbc000 7fffffffffffffff ffff88003cedc150 ffff88003dafe8d0 [ 240.861651] ffff88003dafe8d0 ffff88003cdbbb58 ffffffff81af0812 0000000000000002 [ 240.875103] Call Trace: [ 240.879301] [] schedule+0x32/0x80 [ 240.885835] [] schedule_timeout+0x139/0x190 [ 240.895976] [] ? usb_alloc_dev+0x2b/0x310 [ 240.905071] [] wait_for_common+0xce/0x1e0 [ 240.929943] [] ? wake_up_process+0x50/0x50 [ 240.938833] [] wait_for_completion+0x18/0x20 [ 240.946345] [] xhci_alloc_dev+0x9f/0x270 [ 240.954751] [] usb_alloc_dev+0x69/0x310 [ 240.962074] [] hub_event+0x7c9/0x12f0 [ 240.968884] [] process_one_work+0x13d/0x380 [ 240.978075] [] worker_thread+0x6b/0x550 [ 240.985503] [] ? process_one_work+0x380/0x380 [ 240.992991] [] kthread+0xd6/0xf0 [ 240.999994] [] ? kthread_create_on_node+0x180/0x180 [ 241.008045] [] ret_from_fork+0x42/0x70 [ 241.015867] [] ? kthread_create_on_node+0x180/0x180 [ 241.027458] INFO: task udevd:1600 blocked for more than 120 seconds. [ 241.035950] Not tainted 4.1.0-rc7-20150609-security+ #1 [ 241.043372] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 241.055299] udevd D ffff88003b4ffc38 0 1600 1562 0x00000004 [ 241.066287] ffff88003b4ffc38 ffff88003b4ffc48 ffff88003d328000 ffff88003b4ffc28 [ 241.080800] ffff88003b500000 ffff88003db978f4 ffff88003d328000 00000000ffffffff [ 241.095124] ffff88003db978f8 ffff88003b4ffc58 ffffffff81af0812 ffff88003db978f0 [ 241.108802] Call Trace: [ 241.113716] [] schedule+0x32/0x80 [ 241.120665] [] schedule_preempt_disabled+0x9/0x10 [ 241.128191] [] __mutex_lock_slowpath+0x95/0x110 [ 241.137652] [] mutex_lock+0x1e/0x40 [ 241.144911] [] product_show+0x1f/0x50 [ 241.153177] [] dev_attr_show+0x1b/0x50 [ 241.161507] [] ? mutex_lock+0x11/0x40 [ 241.168354] [] sysfs_kf_seq_show+0xbb/0x150 [ 241.180683] [] kernfs_seq_show+0x1b/0x20 [ 241.190340] [] seq_read+0xcd/0x3b0 [ 241.200103] [] kernfs_fop_read+0x105/0x170 [ 241.209954] [] ? do_filp_open+0x35/0xb0 [ 241.220031] [] __vfs_read+0x23/0xd0 [ 241.230325] [] ? __fd_install+0x48/0x60 [ 241.238748] [] vfs_read+0x85/0x140 [ 241.245479] [] SyS_read+0x45/0xc0 [ 241.253530] [] system_call_fastpath+0x12/0x71