From: Sander Eikelenboom Subject: Re: Xen pci-passthrough problem with pci-detach and pci-assignable-remove Date: Fri, 24 Jan 2014 19:53:48 +0100 Message-ID: <5410177059.20140124195348@eikelenboom.it> References: <1447395332.20140110155157@eikelenboom.it> <20140110151218.GA20152@phenom.dumpdata.com> <1087166993.20140110165729@eikelenboom.it> <20140110161248.GE21360@phenom.dumpdata.com> <1010658460.20140110171623@eikelenboom.it> <20140110173809.GA19423@pegasus.dumpdata.com> <1889333978.20140124143602@eikelenboom.it> <20140124174806.GA15571@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W6lt4-0002y9-8l for xen-devel@lists.xenproject.org; Fri, 24 Jan 2014 18:53:54 +0000 In-Reply-To: <20140124174806.GA15571@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: xen-devel List-Id: xen-devel@lists.xenproject.org Friday, January 24, 2014, 6:48:06 PM, you wrote: > On Fri, Jan 24, 2014 at 02:36:02PM +0100, Sander Eikelenboom wrote: >> >> Friday, January 10, 2014, 6:38:10 PM, you wrote: >> >> >> > Wow. You just walked in a pile of bugs didn't you? And on Friday >> >> > nonethless. >> >> >> >> As usual ;-) >> >> > Ha! >> > ..snip.. >> >> >> [ 489.082358] [] ? mutex_spin_on_owner+0x38/0x45 >> >> >> [ 489.106272] [] ? schedule_preempt_disabled+0x6/0x9 >> >> >> [ 489.130158] [] ? __mutex_lock_slowpath+0x159/0x1b5 >> >> >> [ 489.154147] [] ? mutex_lock+0x16/0x25 >> >> >> [ 489.177890] [] ? pci_reset_function+0x26/0x4e >> >> >> >> > Yeah, that bug my RFC patchset (the one that does the slot/bus reset) should also fix. >> >> > I totally forgot about it ! >> >> >> >> Got a link to that patchset ? >> >> > https://lkml.org/lkml/2013/12/13/315 >> >> >> I at least could give it a spin .. you never know when fortune is on your side :-) >> >> > It is also at this git tree: >> >> > git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git and the >> > branch name is "devel/xen-pciback.slot_and_bus.v0". You will likely >> > want to merge it in your current Linus tree. >> >> > Thank you! >> >> >> Hi Konrad, >> >> Just got time to test this some more, when merging this branch *except* the last commit (9599a5ad38a3bb250e996ccb2cdaab6fb68aaacd) >> seems to help with my problem,i'm no capable of using: >> - xl pci-detach >> - xl pci-assignable-remove >> - echo "BDF" > /sys/bus/pci/drivers//bind >> >> to remove a pci device from a running HVM guest and rebinding it to a driver in dom0 without those nasty stacktraces :-) >> So the first 4 seem to be an improvement. >> >> That last commit (9599a5ad38a3bb250e996ccb2cdaab6fb68aaacd) seems to give troubles of it's own. > Could you email me your lspci output and also which devices you move/switch etc? Hmm hope you didn't misunderstood :-) I now spot a missing "w" .. i am noW capable of .. :-) So it works when the first 4 patches of that branch are applied, I tried with both a NIC and a wireless NIC and had no problems. The problems with that last commit don't seem to be related to that moving/switch of devices it also occurs on a more regular create or shutdown of a guest with a device passed through to it. Just to be complete here is a stacktrace of the hung task i encounter then: [ 968.600248] INFO: task xenwatch:29 blocked for more than 120 seconds. [ 968.601885] Not tainted 3.13.020140123-pcireset-p5+ #1 [ 968.603086] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 968.605298] xenwatch D ffff88003fb6c1d0 0 29 2 0x00000000 [ 968.607007] ffff88003fb6c1d0 0000000000000246 ffffffff81a0af60 ffff880038c8a980 [ 968.608773] 0000000000013f00 0000000000013f00 ffff88003fb6c1d0 ffff88003fb9bfd8 [ 968.609515] ffff88003fb6c1d0 7fffffffffffffff 7fffffffffffffff 0000000000000002 [ 968.610260] Call Trace: [ 968.610493] [] ? genl_set_err.isra.15.constprop.21+0x51/0x51 [ 968.611163] [] ? schedule_timeout+0x2c/0x123 [ 968.641854] [] ? read_reply+0xcc/0xd8 [ 968.666733] [] ? kfree+0x50/0x6f [ 968.691593] [] ? arch_local_irq_restore+0x7/0x8 [ 968.716408] [] ? read_reply+0xcc/0xd8 [ 968.740956] [] ? arch_local_irq_disable+0x7/0x8 [ 968.765631] [] ? __wait_for_common+0x123/0x15e [ 968.790148] [] ? try_to_wake_up+0x198/0x198 [ 968.814917] [] ? _raw_spin_unlock_irqrestore+0xb/0xc [ 968.839656] [] ? pcistub_get_pci_dev_by_slot+0xc3/0xd5 [ 968.864307] [] ? xen_pcibk_export_device+0x27/0xfe [ 968.888824] [] ? xen_pcibk_setup_backend+0x145/0x265 [ 968.913094] [] ? xen_pcibk_xenbus_probe+0xeb/0x12a [ 968.937093] [] ? xenbus_dev_probe+0x56/0xb5 [ 968.961314] [] ? __driver_attach+0x73/0x73 [ 968.985750] [] ? driver_probe_device+0x92/0x1b3 [ 969.010282] [] ? bus_for_each_drv+0x46/0x80 [ 969.034570] [] ? device_attach+0x68/0x86 [ 969.058685] [] ? bus_probe_device+0x2c/0x9d [ 969.082670] [] ? device_add+0x371/0x51c [ 969.106462] [] ? init_timer_key+0xe/0x5a [ 969.130155] [] ? xenbus_probe_node+0x121/0x160 [ 969.153793] [] ? xenbus_dev_request_and_reply+0x75/0x75 [ 969.177396] [] ? xenbus_dev_changed+0x175/0x1a4 [ 969.200938] [] ? xenwatch_thread+0xc8/0xf2 [ 969.224678] [] ? xenbus_dev_request_and_reply+0x75/0x75 [ 969.248560] [] ? bit_waitqueue+0x82/0x82 [ 969.272249] [] ? kthread+0x99/0xa1 [ 969.296128] [] ? xen_mc_issue.constprop.20+0x27/0x4d [ 969.320029] [] ? get_task_pid+0x2a/0x2c [ 969.343706] [] ? __kthread_parkme+0x59/0x59 [ 969.367233] [] ? ret_from_fork+0x7c/0xb0 [ 969.390736] [] ? __kthread_parkme+0x59/0x59 > Thanks! >> >> -- >> Sander >>