From: "Nick Couchman" Subject: Re: PCI Passthrough Problems/Questions Date: Wed, 27 Oct 2010 09:07:20 -0600 Message-ID: <4CC7EBC802000099000BA923@collaborate.seakr.com> References: <4CC55D5C02000099000BA698@collaborate.seakr.com> <20101025174033.GA5766@dumpdata.com> <4CC5790502000099000BA6DC@collaborate.seakr.com> <20101025184818.GA6259@dumpdata.com> <4CC57D2102000099000BA6E6@collaborate.seakr.com> <20101025190752.GB6452@dumpdata.com> <4CC7C95E.7020500@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4CC7C95E.7020500@intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: weidong.han@intel.com Cc: xen-devel@lists.xensource.com, konrad.wilk@Oracle.Com List-Id: xen-devel@lists.xenproject.org > Nick, >=20 > I think the issue is 02:00.0 was mapped twice. Could you try with below= =20 > patch? Then post the xen log. Pls post all output of 'lspci -v' on your= =20 > system. >=20 I applied the patch, with one minor change. The line: dprintk(XENLOG_ERR VTDPREFIX, "context_present: %x:%x.%x:pdev->domain=3D%= d domain=3D%d\n", bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pdev->domain, domain->domain_id); should be: dprintk(XENLOG_ERR VTDPREFIX, "context_present: %x:%x.%x:pdev->domain=3D%= d domain=3D%d\n", bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pdev->domain->domain_id, domain->domain_id); (notice the pdev->domain->domain_id instead of pdev->domain). The domU no longer generates the error about failing to assign device to IOMMU, but now it just silently crashes. xm dmesg output: (XEN) [VT-D]iommu.c:1511: d0:PCI: unmap bdf =3D 2:0.0 (XEN) [VT-D]iommu.c:1340: bus: 2, devfn: 0[VT-D]iommu.c:1368: d1:PCI: map bdf =3D 2:0.0 (XEN) [VT-D]iommu.c:1371: domain_conext_mapping_one ret: 0 (XEN) [VT-D]iommu.c:1378: Upstream bridge for 1:0 is 2. (XEN) [VT-D]iommu.c:1383: d1:PCI: map PCIe2PCI bdf =3D 1:0.0 (XEN) [VT-D]iommu.c:1394: d1:PCI: map secbus (2) with devfn 0 (XEN) [VT-D]iommu.c:1249: context_present: 2:0.0:pdev->domain=3D0 domain=3D= 1 (XEN) [VT-D]iommu.c:1415: Return value: 0 (XEN) [VT-D]io.c:300: d1: bind: m_gsi=3D16 g_gsi=3D36 device=3D5 intx=3D0 (XEN) [VT-D]iommu.c:1511: d0:PCI: unmap bdf =3D 2:0.1 (XEN) [VT-D]iommu.c:1340: bus: 2, devfn: 1[VT-D]iommu.c:1368: d1:PCI: map bdf =3D 2:0.1 (XEN) [VT-D]iommu.c:1371: domain_conext_mapping_one ret: 0 (XEN) [VT-D]iommu.c:1378: Upstream bridge for 1:0 is 2. (XEN) [VT-D]iommu.c:1383: d1:PCI: map PCIe2PCI bdf =3D 1:0.0 (XEN) [VT-D]iommu.c:1394: d1:PCI: map secbus (2) with devfn 0 (XEN) [VT-D]iommu.c:1415: Return value: 0 (XEN) [VT-D]io.c:300: d1: bind: m_gsi=3D16 g_gsi=3D40 device=3D6 intx=3D0 (XEN) [VT-D]iommu.c:1511: d1:PCI: unmap bdf =3D 2:0.1 (XEN) [VT-D]iommu.c:1340: bus: 2, devfn: 1[VT-D]iommu.c:1368: d0:PCI: map bdf =3D 2:0.1 (XEN) [VT-D]iommu.c:1371: domain_conext_mapping_one ret: 0 (XEN) [VT-D]iommu.c:1378: Upstream bridge for 1:0 is 2. (XEN) [VT-D]iommu.c:1383: d0:PCI: map PCIe2PCI bdf =3D 1:0.0 (XEN) [VT-D]iommu.c:1394: d0:PCI: map secbus (2) with devfn 0 (XEN) [VT-D]iommu.c:1415: Return value: 0 (XEN) [VT-D]iommu.c:1511: d1:PCI: unmap bdf =3D 2:0.0 (XEN) [VT-D]iommu.c:1340: bus: 2, devfn: 0[VT-D]iommu.c:1368: d0:PCI: map bdf =3D 2:0.0 (XEN) [VT-D]iommu.c:1371: domain_conext_mapping_one ret: 0 (XEN) [VT-D]iommu.c:1378: Upstream bridge for 1:0 is 2. (XEN) [VT-D]iommu.c:1383: d0:PCI: map PCIe2PCI bdf =3D 1:0.0 (XEN) [VT-D]iommu.c:1394: d0:PCI: map secbus (2) with devfn 0 (XEN) [VT-D]iommu.c:1249: context_present: 2:0.0:pdev->domain=3D1 domain=3D= 0 (XEN) [VT-D]iommu.c:1415: Return value: 0 And from xend.log I've pasted into this pastebin: http://pastebin.com/b4bwdBPq I have some extra dprintk calls that I threw in there, so there may be a little more output than with the patch you sent. -Nick --------=0D This e-mail may contain confidential and privileged material for the sole= use of the intended recipient. If this email is not intended for you, o= r you are not responsible for the delivery of this message to the intende= d recipient, please note that this message may contain SEAKR Engineering = (SEAKR) Privileged/Proprietary Information. In such a case, you are stri= ctly prohibited from downloading, photocopying, distributing or otherwise= using this message, its contents or attachments in any way. If you have= received this message in error, please notify us immediately by replying= to this e-mail and delete the message from your mailbox. Information co= ntained in this message that does not relate to the business of SEAKR is = neither endorsed by nor attributable to SEAKR.