xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Gordan Bobic <gordan@bobich.net>
To: xen-devel@lists.xenproject.org
Subject: Re: Multi-bridged PCIe devices (Was: Re: iommuu/vt-d issues with LSI MegaSAS (PERC5i))
Date: Wed, 11 Sep 2013 13:14:22 +0100	[thread overview]
Message-ID: <9bd7c39084e6b264dda5b6ac256ea97b@mail.shatteredsilicon.net> (raw)
In-Reply-To: <523075C502000078000F2617@nat28.tlf.novell.com>

 On Wed, 11 Sep 2013 12:53:09 +0100, "Jan Beulich" <JBeulich@suse.com> 
 wrote:
>>>> On 11.09.13 at 13:05, Gordan Bobic <gordan@bobich.net> wrote:
>> I found this:
>>
>>  http://lists.xen.org/archives/html/xen-devel/2010-06/msg00093.html
>>
>>  while looking for a solution to a similar problem. I am
>>  facing a similar issue with LSI (8408E, 3081E-R) and
>>  Adaptec (31605) SAS cards. Was there ever a proper, more general
>>  fix or workaround for this issue?
>>
>>  These SAS cards experience these problems in dom0. When running
>>  a vanilla kernel on bare metal, they work OK without intel_iommu
>>  set. As soon as I set intel_iommu, the same thing happens (on
>>  bare metal, not dom0).
>>
>>  Clearly there is something badly broken with multiple layers
>>  of bridges when it comes to IOMMU in my setup (Intel 5520 PCIe
>>  root hub -> NF200 bridge -> Intel 80333 Bridge -> SAS controller)
>
> The link above has some (hackish) workarounds - did you try
> them?

 Not yet. The thing that bothers me is that he workaround
 involves hard-coding the PCI device ID which is _nasty_
 and unstable.

> The link above, however, doesn't indicate any relationship to
> multiple bridges being in between, so it may not match what
> you're observing.

 The impression I got was that the "invisible" devices the
 previous thread was referring to were bridges on the SAS
 card. But I may have misunderstood.

> In any event, seeing a hypervisor log with "iommu=debug" might
> shed further light on this: For one, we might be able to see which
> exact devices are present in the ACPI tables. And we would see
> which device(s) eventual faults originate from.

 The thing that bothers me is that this happens in dom0 even
 with iommu=dom0-passthrough being set.
 iommu=dom0-passthrough,workaround_bios_bug doesn't help,
 either

 And lo and behold, I do have phantom PCI devices after all!
 lspci shows no device with ID 0000:0f:01.0


 (XEN) [VT-D]iommu.c:887: iommu_fault_status: Primary Pending Fault
 (XEN) [VT-D]iommu.c:865: DMAR:[DMA Write] Request device [0000:0f:01.0] 
 fault addr 857f15000, iommu reg = ffff82c3ffd54000
 (XEN) DMAR:[fault reason 02h] Present bit in context entry is clear
 (XEN) print_vtd_entries: iommu ffff83043fff5600 dev 0000:0f:01.0 gmfn 
 857f15
 (XEN)     root_entry = ffff83043ffe5000
 (XEN)     root_entry[f] = e6f7001
 (XEN)     context = ffff83000e6f7000
 (XEN)     context[8] = 0_0
 (XEN)     ctxt_entry[8] not present
 (XEN) [VT-D]iommu.c:887: iommu_fault_status: Primary Pending Fault
 (XEN) [VT-D]iommu.c:865: DMAR:[DMA Write] Request device [0000:0f:01.0] 
 fault addr 858a35000, iommu reg = ffff82c3ffd54000
 (XEN) DMAR:[fault reason 02h] Present bit in context entry is clear
 (XEN) print_vtd_entries: iommu ffff83043fff5600 dev 0000:0f:01.0 gmfn 
 858a35
 (XEN)     root_entry = ffff83043ffe5000
 (XEN)     root_entry[f] = e6f7001
 (XEN)     context = ffff83000e6f7000
 (XEN)     context[8] = 0_0
 (XEN)     ctxt_entry[8] not present
 (XEN) [VT-D]iommu.c:887: iommu_fault_status: Primary Pending Fault
 (XEN) [VT-D]iommu.c:865: DMAR:[DMA Write] Request device [0000:0f:01.0] 
 fault addr 471df8000, iommu reg = ffff82c3ffd54000
 (XEN) DMAR:[fault reason 02h] Present bit in context entry is clear
 (XEN) print_vtd_entries: iommu ffff83043fff5600 dev 0000:0f:01.0 gmfn 
 471df8
 (XEN)     root_entry = ffff83043ffe5000
 (XEN)     root_entry[f] = e6f7001
 (XEN)     context = ffff83000e6f7000
 (XEN)     context[8] = 0_0
 (XEN)     ctxt_entry[8] not present
 (XEN) [VT-D]iommu.c:887: iommu_fault_status: Primary Pending Fault
 (XEN) [VT-D]iommu.c:865: DMAR:[DMA Write] Request device [0000:0f:01.0] 
 fault addr 46fc22000, iommu reg = ffff82c3ffd54000
 (XEN) DMAR:[fault reason 02h] Present bit in context entry is clear
 (XEN) print_vtd_entries: iommu ffff83043fff5600 dev 0000:0f:01.0 gmfn 
 46fc22
 (XEN)     root_entry = ffff83043ffe5000
 (XEN)     root_entry[f] = e6f7001
 (XEN)     context = ffff83000e6f7000
 (XEN)     context[8] = 0_0
 (XEN)     ctxt_entry[8] not present

 Gordan

  reply	other threads:[~2013-09-11 12:14 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-11 11:05 Multi-bridged PCIe devices (Was: Re: iommuu/vt-d issues with LSI MegaSAS (PERC5i)) Gordan Bobic
2013-09-11 11:25 ` Gordan Bobic
2013-09-11 11:44   ` Gordan Bobic
2013-09-11 11:57     ` Jan Beulich
2013-09-11 12:19       ` Gordan Bobic
2013-09-11 12:56         ` Pasi Kärkkäinen
2013-09-11 11:53 ` Jan Beulich
2013-09-11 12:14   ` Gordan Bobic [this message]
2013-09-11 12:31     ` Jan Beulich
2013-09-11 12:45       ` Gordan Bobic
2013-09-11 13:03         ` Jan Beulich
2013-09-11 13:10           ` Gordan Bobic
2013-09-11 13:22             ` Jan Beulich
2013-09-11 13:26               ` Gordan Bobic
2013-09-11 13:36                 ` Jan Beulich
2013-09-12  6:20                   ` Zhang, Yang Z
2013-12-11 18:32                     ` Konrad Rzeszutek Wilk
2013-12-11 21:15                       ` Gordan Bobic
2013-12-11 21:30                         ` Konrad Rzeszutek Wilk
2013-12-13 11:13                           ` Jan Beulich
2013-12-13 14:43                             ` Konrad Rzeszutek Wilk
2013-12-13 14:56                               ` Jan Beulich
2013-12-13 15:27                                 ` Gordan Bobic
2014-01-06 20:26                                   ` Konrad Rzeszutek Wilk
2014-01-06 21:45                                     ` Konrad Rzeszutek Wilk
2014-01-07  3:17                                       ` Zhang, Yang Z
2014-01-07 10:35                                         ` Gordan Bobic
2014-01-07 10:38                                           ` Andrew Cooper
2014-01-07 10:44                                             ` Gordan Bobic
2014-02-21 19:08                                               ` Konrad Rzeszutek Wilk
2014-02-24 10:14                                                 ` Jan Beulich
2013-09-11 13:23           ` Gordan Bobic
2013-09-11 13:34             ` Jan Beulich
  -- strict thread matches above, loose matches on Subject: below --
2014-01-07 11:26 Wu, Feng
2014-01-07 11:35 ` Gordan Bobic
2014-01-07 12:15   ` Jan Beulich
2014-01-07 12:42     ` Gordan Bobic
2014-01-07 14:38       ` Konrad Rzeszutek Wilk
2014-01-07 14:47         ` Jan Beulich
2014-01-07 15:40           ` Konrad Rzeszutek Wilk

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=9bd7c39084e6b264dda5b6ac256ea97b@mail.shatteredsilicon.net \
    --to=gordan@bobich.net \
    --cc=xen-devel@lists.xenproject.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).