All of lore.kernel.org
 help / color / mirror / Atom feed
From: Weidong Han <weidong.han@intel.com>
To: Nick Couchman <Nick.Couchman@seakr.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"konrad.wilk@Oracle.Com" <konrad.wilk@Oracle.Com>
Subject: Re: PCI Passthrough Problems/Questions
Date: Thu, 28 Oct 2010 10:31:01 +0800	[thread overview]
Message-ID: <4CC8E065.8060509@intel.com> (raw)
In-Reply-To: <4CC7EBC802000099000BA923@collaborate.seakr.com>

Nick Couchman wrote:
>> Nick,
>>
>> I think the issue is 02:00.0 was mapped twice. Could you try with below 
>> patch? Then post the xen log. Pls post all output of 'lspci -v' on your 
>> system.
>>
>>     
>
> I applied the patch, with one minor change.  The line:
>
> dprintk(XENLOG_ERR VTDPREFIX, "context_present: %x:%x.%x:pdev->domain=%d
> domain=%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=%d
> domain=%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 = 2:0.0
> (XEN) [VT-D]iommu.c:1340: bus: 2, devfn: 0[VT-D]iommu.c:1368: d1:PCI:
> map bdf = 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 = 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=0 domain=1
> (XEN) [VT-D]iommu.c:1415: Return value: 0
> (XEN) [VT-D]io.c:300: d1: bind: m_gsi=16 g_gsi=36 device=5 intx=0
> (XEN) [VT-D]iommu.c:1511: d0:PCI: unmap bdf = 2:0.1
> (XEN) [VT-D]iommu.c:1340: bus: 2, devfn: 1[VT-D]iommu.c:1368: d1:PCI:
> map bdf = 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 = 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=16 g_gsi=40 device=6 intx=0
> (XEN) [VT-D]iommu.c:1511: d1:PCI: unmap bdf = 2:0.1
> (XEN) [VT-D]iommu.c:1340: bus: 2, devfn: 1[VT-D]iommu.c:1368: d0:PCI:
> map bdf = 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 = 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 = 2:0.0
> (XEN) [VT-D]iommu.c:1340: bus: 2, devfn: 0[VT-D]iommu.c:1368: d0:PCI:
> map bdf = 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 = 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=1 domain=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.
>
>
>   

the log of xm dmesg looks no problem. you'd better post complete log and 
lspci -v.

Regards,
Weidong

  reply	other threads:[~2010-10-28  2:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-25 16:35 PCI Passthrough Problems/Questions Nick Couchman
2010-10-25 17:40 ` Konrad Rzeszutek Wilk
2010-10-25 18:33   ` Nick Couchman
2010-10-25 18:48     ` Konrad Rzeszutek Wilk
2010-10-25 18:50       ` Nick Couchman
2010-10-25 19:07         ` Konrad Rzeszutek Wilk
2010-10-25 19:45           ` Nick Couchman
2010-10-25 20:11           ` Nick Couchman
2010-10-27  6:40           ` Weidong Han
2010-10-27 15:07             ` Nick Couchman
2010-10-28  2:31               ` Weidong Han [this message]
     [not found] <4CC8A62602000099000BAA42@collaborate.seakr.com>
2010-10-28  4:37 ` Han, Weidong
  -- strict thread matches above, loose matches on Subject: below --
2010-10-28 14:01 Nick Couchman
2010-10-29  2:54 ` Weidong Han
2010-10-29 18:52   ` Nick Couchman
2010-11-02  3:30     ` Weidong Han
2010-11-02 19:07       ` Nick Couchman
2010-11-03  1:01         ` Weidong Han
2010-11-03 14:54           ` Nick Couchman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CC8E065.8060509@intel.com \
    --to=weidong.han@intel.com \
    --cc=Nick.Couchman@seakr.com \
    --cc=konrad.wilk@Oracle.Com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.