mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Andrew Cooks <acooks@gmail.com>
Cc: "open list:PCI SUBSYSTEM" <linux-pci@vger.kernel.org>,
	"open list:INTEL IOMMU (VT-d)" <iommu@lists.linux-foundation.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 00/15] PCI/iommu: Fix DMA alias problems
Date: Thu, 15 May 2014 11:43:54 -0600	[thread overview]
Message-ID: <1400175834.3289.65.camel@ul30vt.home> (raw)
In-Reply-To: <CAJtEV7YYB4W_+nZeMgiqZVDV+M4OyFJVBic09z=KbMjOpihnTQ@mail.gmail.com>

On Thu, 2014-05-15 at 07:40 +0800, Andrew Cooks wrote:
> Hi Alex
> 
> On Fri, May 9, 2014 at 11:28 PM, Alex Williamson
> <alex.williamson@redhat.com> wrote:
> > ....
> >
> > Original description:
> >
> > This series attempts to fix a couple issues we've had outstanding in
> > the PCI/IOMMU code for a while.  The first issue is with devices that
> > use the wrong requester ID for DMA transactions.  We already have a
> > sort of half-baked attempt to fix this for several Ricoh devices, but
> > the fix only helps them be useful through IOMMU groups, not the
> > general DMA case.  There are also several Marvell devices which use
> > use a different wrong requester ID and don't even fit into the DMA
> > source idea.  This series creates a DMA alias iterator that will
> > step through each possible alias of a device, allowing IOMMUs to
> > insert mappings for both the device and its aliases.
> >
> > Hand-in-hand with this is our broken pci_find_upstream_pcie_bridge()
> > function, which is known to blowup when it finds itself suddenly at
> > a PCIe device without crossing a PCIe-to-PCI bridge (as identified by
> > the PCIe capability).  It also likes to make the invalid assumption
> > that a PCIe device never has its requester ID masked by any usptream
> > bus.  We can fix this using the above new DMA alias iterator, since
> > that's effectively what this function was meant to do.
> >
> 
> There are two cases where the DMA requester id seems to use the wrong
> slot (as opposed to function) in the patch I attached to
> https://bugzilla.kernel.org/show_bug.cgi?id=42679
> The original bug reports are listed in the patch.
> 
> Unfortunately, I wasn't able to get test feedback on those two cases,
> but I'm wondering...
> Did I understand correctly that a slot alias is something that could be needed?
> If so, is it a variation of the PCIe-to-PCI bridge case that's already
> covered or will it require a different approach?

Wow, I didn't think that kind of broken was possible.  Maybe instead of
a bitmap of function aliases we could have a single devfn alias for a
device.  That means we'd only be able to support a single alias for a
device, but since I don't think we've seen devices that use more than a
single alias, maybe that's ok.  I'll see what changes we'd need to make
for that, but I probably won't go adding the actual quirk based on those
old reports.  Thanks,

Alex


  reply	other threads:[~2014-05-15 17:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 15:28 Alex Williamson
2014-05-09 15:28 ` [PATCH v2 01/15] PCI: Add DMA alias iterator Alex Williamson
2014-05-09 15:28 ` [PATCH v2 02/15] PCI: quirk pci_for_each_dma_alias() Alex Williamson
2014-05-09 15:28 ` [PATCH v2 03/15] PCI: quirk dma_func_alias for Ricoh devices Alex Williamson
2014-05-09 15:28 ` [PATCH v2 04/15] PCI: quirk dma_func_alias for Marvell devices Alex Williamson
2014-05-09 15:28 ` [PATCH v2 05/15] PCI: Quirk pci_for_each_dma_alias() for bridges Alex Williamson
2014-05-09 15:29 ` [PATCH v2 06/15] PCI: Add quirks for ASMedia and Tundra bridges Alex Williamson
2014-05-09 15:29 ` [PATCH v2 07/15] PCI: Consolidate isolation domain code Alex Williamson
2014-05-09 15:29 ` [PATCH v2 08/15] iommu/amd: Use pci_find_dma_isolation_root() for IOMMU groups Alex Williamson
2014-05-09 15:29 ` [PATCH v2 09/15] iommu/amd: Update to use PCI DMA aliases Alex Williamson
2014-05-09 15:29 ` [PATCH v2 10/15] iommu/intel: Use pci_find_dma_isolation_root() for IOMMU groups Alex Williamson
2014-05-09 15:29 ` [PATCH v2 11/15] iommu/intel: Update to use PCI DMA aliases Alex Williamson
2014-05-09 15:29 ` [PATCH v2 12/15] iommu/fsl: Use pci_find_dma_isolation_root() for IOMMU groups Alex Williamson
2014-05-09 15:29 ` [PATCH v2 13/15] iommu: Remove pci.h Alex Williamson
2014-05-09 15:29 ` [PATCH v2 14/15] PCI: Remove pci_find_upstream_pcie_bridge() Alex Williamson
2014-05-09 15:29 ` [PATCH v2 15/15] PCI: Remove pci_get_dma_source() Alex Williamson
2014-05-14 23:40 ` [PATCH v2 00/15] PCI/iommu: Fix DMA alias problems Andrew Cooks
2014-05-15 17:43   ` Alex Williamson [this message]
2014-05-15 23:45     ` Andrew Cooks
2014-05-16  3:55       ` Alex Williamson
     [not found] <20140510140814.16061.qmail@ns.horizon.com>
2014-05-10 14:15 ` Alex Williamson
2014-05-10 16:16   ` George Spelvin

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=1400175834.3289.65.camel@ul30vt.home \
    --to=alex.williamson@redhat.com \
    --cc=acooks@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.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

all inboxes | Powered by JetHome®