From: Alex Williamson <alex.williamson@redhat.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org,
bhelgaas@google.com, acooks@gmail.com,
linux-kernel@vger.kernel.org, linux@horizon.com
Subject: Re: [PATCH v3 08/15] iommu/amd: Use pci_find_dma_isolation_root() for IOMMU groups
Date: Wed, 14 May 2014 08:27:11 -0600 [thread overview]
Message-ID: <1400077631.17639.185.camel@ul30vt.home> (raw)
In-Reply-To: <20140514103449.GE6026@8bytes.org>
On Wed, 2014-05-14 at 12:34 +0200, Joerg Roedel wrote:
> On Sat, May 10, 2014 at 09:03:11AM -0600, Alex Williamson wrote:
> > The expectation is that the kernel and IVRS will produce the same
> > result for topology based aliases while the kernel will also include
> > device specific DMA quirks.
>
> Is that expectation really true? There are PCIe devices out there that
> don't use their own device-id for requests but another one that isn't
> even visible as a PCI device (so the kernel has no pci_dev structure for
> it). The IVRS table contains such information, but I am not sure whether
> the PCI core finds the right requestor-id for those devices.
>
> I've seen this on PCIe cards that where the vendor just used an PCI-X
> chip with a PCIe-to-PCI-X bridge on the card. The PCI-X device is
> visible for the OS but uses the requestor-id of the invisible bridge.
If we rely on the IVRS, then the set of devices with quirked aliases is
fixed by the platform vendor. More often than not, I think that proves
to be ineffective. I personally have a 990FX box with a single function
Marvell SATA controller that uses function 1 as the requester ID. It's
running the latest BIOS and the IVRS isn't helping. With this series,
we have the ability to add quirks to the kernel to fix those kinds of
issues for both AMD-Vi, VT-d, and any other IOMMU.
Here I've chosen that we get more value from using shared code so we
don't process IOMMU groups in a unique way for AMD-Vi. Patch 09/15 uses
the PCI core alias when the IVRS doesn't provide one, perhaps a
compromise would be to also do the reverse and update dma_func_alias on
the device when the IVRS knows of a device quirk that the kernel
doesn't. Then we could still use the common IOMMU group code and print
something to dmesg so that we can update the kernel quirks. Thanks,
Alex
next prev parent reply other threads:[~2014-05-14 14:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-10 15:02 [PATCH v3 00/15] PCI/iommu: Fix DMA alias problems Alex Williamson
2014-05-10 15:02 ` [PATCH v3 01/15] PCI: Add DMA alias iterator Alex Williamson
2014-05-10 15:02 ` [PATCH v3 02/15] PCI: quirk pci_for_each_dma_alias() Alex Williamson
2014-05-10 15:02 ` [PATCH v3 03/15] PCI: quirk dma_func_alias for Ricoh devices Alex Williamson
2014-05-10 15:02 ` [PATCH v3 04/15] PCI: quirk dma_func_alias for Marvell devices Alex Williamson
2014-05-10 15:02 ` [PATCH v3 05/15] PCI: Quirk pci_for_each_dma_alias() for bridges Alex Williamson
2014-05-10 15:02 ` [PATCH v3 06/15] PCI: Add quirks for ASMedia and Tundra bridges Alex Williamson
2014-05-10 15:03 ` [PATCH v3 07/15] PCI: Consolidate isolation domain code Alex Williamson
2014-05-10 15:03 ` [PATCH v3 08/15] iommu/amd: Use pci_find_dma_isolation_root() for IOMMU groups Alex Williamson
2014-05-14 10:34 ` Joerg Roedel
2014-05-14 14:27 ` Alex Williamson [this message]
2014-05-10 15:03 ` [PATCH v3 09/15] iommu/amd: Update to use PCI DMA aliases Alex Williamson
2014-05-10 15:03 ` [PATCH v3 10/15] iommu/intel: Use pci_find_dma_isolation_root() for IOMMU groups Alex Williamson
2014-05-10 15:03 ` [PATCH v3 11/15] iommu/intel: Update to use PCI DMA aliases Alex Williamson
2014-05-10 15:03 ` [PATCH v3 12/15] iommu/fsl: Use pci_find_dma_isolation_root() for IOMMU groups Alex Williamson
2014-05-10 15:03 ` [PATCH v3 13/15] iommu: Remove pci.h Alex Williamson
2014-05-10 15:03 ` [PATCH v3 14/15] PCI: Remove pci_find_upstream_pcie_bridge() Alex Williamson
2014-05-10 15:03 ` [PATCH v3 15/15] PCI: Remove pci_get_dma_source() Alex Williamson
2014-05-10 16:51 ` [PATCH v3 00/15] PCI/iommu: Fix DMA alias problems George Spelvin
2014-05-13 22:35 ` eddy0596
2014-05-14 17:18 ` Alex Williamson
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=1400077631.17639.185.camel@ul30vt.home \
--to=alex.williamson@redhat.com \
--cc=acooks@gmail.com \
--cc=bhelgaas@google.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@horizon.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 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®