From mboxrd@z Thu Jan 1 00:00:00 1970 From: Weidong Han Subject: Re: pciback bug "secondary bus reset failed" Date: Tue, 25 May 2010 09:03:33 +0800 Message-ID: <4BFB21E5.5040905@intel.com> References: <4BFAA0DD.3060900@eu.citrix.com> <20100524163023.GZ17817@reaktio.net> <4BFAAEED.3050606@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4BFAAEED.3050606@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Alex Zeffertt Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Alex Zeffertt wrote: > Pasi K=E4rkk=E4inen wrote: > =20 >> On Mon, May 24, 2010 at 04:53:01PM +0100, Alex Zeffertt wrote: >> =20 >>> Hi, >>> >>> I'm trying to passthrough a PCI network card to a domU guest, but I'm= =20 >>> hitting a bug that prevents the IRQ being unbound from dom0. >>> >>> Here are the steps I am taking: >>> >>> * configure Xen to pass $pci (0000:06:00.0) through to guest VM >>> * unbind from current driver in dom0 and rebind to pciback: >>> >>> echo -n $pci > /sys/bus/pci/devices/$pci/driver/unbind >>> modprobe pciback >>> echo -n $pci > /sys/bus/pci/drivers/pciback/new_slot >>> echo -n $pci > /sys/bus/pci/drivers/pciback/bind >>> >>> * start guest VM >>> >>> I then get the following on the dom0 console >>> >>> pciback 0000:06:00.0: secondary bus reset failed for device - all f= unctions \ >>> need to be co-assigned - err: 6 >>> pciback 0000:06:00.0: FLR functionality not supported; attempts to = use \ >>> secondary bus reset unsuccessful; >>> pciback 0000:06:00.0: FLR not performed for device >>> >>> =20 >> Please check this wiki page: >> http://wiki.xensource.com/xenwiki/XenPCIpassthrough >> >> It has a chapter about the "all functions need to be co-assigned" erro= r.. >> >> -- Pasi >> =20 > > Hi Pasi, > > Thanks for your reply. I think I understand what is happening now. My= card is=20 > too old to have the Function Level Reset functionality. This leaves th= e=20 > following options: > > > 1. Assign all the cards that share the PCI bus (0000:06) to the same = guest.=20 > This enables the FLR functionality to be replaced by the bridge's "Seco= ndary Bus=20 > Reset" functionality > > - or - > > 2. Apply the patch referred to on=20 > http://wiki.xensource.com/xenwiki/XenPCIpassthrough to bypass the FLR > > > If I can't do number #1 because some cards are in use by dom0 then I gu= ess #2 is=20 > the only option. But does #2 require that dom0 has never accessed the = card?=20 > =20 No. Dom0 still can access the card. Dom0 just doesn't perform FLR on it=20 to avoid your issue. > Also, what if you reboot the domU - does the fact that you can't do an = FLR on=20 > the card mean that there will be unpredictable results the 2nd time dom= U tries=20 > to initialise it? > =20 Yes. FLR is required by pci passthrough. your NIC only can be=20 co-assigned (#1). #2 is just a temporary workaround for your try. Regards, Weidong > Thanks again, > > Alex > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > =20