From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: Xen pci-passthrough problem with pci-detach and pci-assignable-remove Date: Fri, 10 Jan 2014 10:12:18 -0500 Message-ID: <20140110151218.GA20152@phenom.dumpdata.com> References: <1447395332.20140110155157@eikelenboom.it> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W1dl6-0006pS-C4 for xen-devel@lists.xenproject.org; Fri, 10 Jan 2014 15:12:28 +0000 Content-Disposition: inline In-Reply-To: <1447395332.20140110155157@eikelenboom.it> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Sander Eikelenboom Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, Jan 10, 2014 at 03:51:57PM +0100, Sander Eikelenboom wrote: > Hi Konrad, > > Normally i'm never reattaching pci devices to dom0, but at the moment i have some use for it. > > But it seems pci-detach isn't completely detaching the device from the guest. > > - Say i have a guest (HVM) with domid=2 and a pci device passedthrough with bdf 00:19.0, the device is hidden on boot with xen-pciback.hide=(00:19.0) in grub. > > - Now i do a "xl pci-assignable-list" > This returns nothing, which is correct since all hidden devices have already been assigned to guests. > > - Then i do "xl -v pci-detach 2 00:19.0" > Which also returns nothing ... > > - Now i do a "xl pci-assignable-list" again .. > This returns: > "0000:00:19.0" > So the pci-detach does seem to have done *something* :-) Or it thinks it has :-) > > - But when now trying to remove the device from pciback to dom0 with "xl pci-assignable-remove 00:19.0" it gives an error > and later it give some stacktraces .. > > xen_pciback: ****** removing device 0000:00:19.0 while still in-use! ****** > xen_pciback: ****** driver domain may still access this device's i/o resources! > xen_pciback: ****** shutdown driver domain before binding device > xen_pciback: ****** to other drivers of domains What about /var/log/xen/qemu-dm* and the 'lspci' in the guest? Is the PCI device removed from there? > > > When i shut the guest down instead of using pci-detach, the "xl pci-assignable-remove" works fine and i can rebind the device to it's driver in dom0. > > So am i misreading the wiki .. and is it not possible to detach a device from a running domain or ... ? > > Oh yes running xen-unstable and a 3.13-rc7 kernel Do you see the same issue with 'xend'? > > -- > Sander > >