linux-sg2042/drivers/pci
Jacek Lawrynowicz 338c3149a2 PCI: Add support for multiple DMA aliases
Solve IOMMU support issues with PCIe non-transparent bridges that use
Requester ID look-up tables (RID-LUT), e.g., the PEX8733.

The NTB connects devices in two independent PCI domains.  Devices separated
by the NTB are not able to discover each other.  A PCI packet being
forwared from one domain to another has to have its RID modified so it
appears on correct bus and completions are forwarded back to the original
domain through the NTB.  The RID is translated using a preprogrammed table
(LUT) and the PCI packet propagates upstream away from the NTB.  If the
destination system has IOMMU enabled, the packet will be discarded because
the new RID is unknown to the IOMMU.  Adding a DMA alias for the new RID
allows IOMMU to properly recognize the packet.

Each device behind the NTB has a unique RID assigned in the RID-LUT.  The
current DMA alias implementation supports only a single alias, so it's not
possible to support mutiple devices behind the NTB when IOMMU is enabled.

Enable all possible aliases on a given bus (256) that are stored in a
bitset.  Alias devfn is directly translated to a bit number.  The bitset is
not allocated for devices that have no need for DMA aliases.

More details can be found in the following article:
http://www.plxtech.com/files/pdf/technical/expresslane/RTC_Enabling%20MulitHostSystemDesigns.pdf

Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: David Woodhouse <David.Woodhouse@intel.com>
Acked-by: Joerg Roedel <jroedel@suse.de>
2016-04-11 14:34:32 -05:00
..
host Revert "PCI: dra7xx: Mark driver as broken" 2016-03-22 07:50:11 -05:00
hotplug s390/pci: remove pdev pointer from arch data 2016-02-23 08:56:16 +01:00
pcie PCI changes for the v4.6 merge window: 2016-03-16 14:45:55 -07:00
Kconfig PCI: Restore inclusion of pci/hotplug Kconfig 2016-03-21 07:33:34 -05:00
Makefile ARC: Add PCI support 2016-03-10 14:44:13 -06:00
access.c PCI: Sleep rather than busy-wait for VPD access completion 2016-03-10 14:24:48 -06:00
ats.c PCI: Remove pci_ats_enabled() 2015-08-13 15:59:59 -05:00
bus.c powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
host-bridge.c Merge branch 'pci/misc' into next 2015-04-10 08:27:18 -05:00
hotplug-pci.c PCI: Remove unnecessary __ref annotations 2014-04-29 17:36:44 -06:00
htirq.c x86/htirq: Use hierarchical irqdomain to manage Hypertransport interrupts 2015-04-24 15:36:50 +02:00
iov.c powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
irq.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
msi.c PCI changes for the v4.5 merge window: 2016-01-21 11:52:16 -08:00
of.c PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing 2015-10-16 13:07:14 +01:00
pci-acpi.c Power management and ACPI updates for v4.5-rc1 2016-01-12 20:25:09 -08:00
pci-driver.c PCI / PM: Tune down retryable runtime suspend error messages 2015-12-02 15:24:21 +01:00
pci-label.c PCI: Fix broken URL for Dell biosdevname 2016-02-29 12:03:19 -06:00
pci-stub.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pci-sysfs.c Merge branch 'pci/resource' into next 2016-03-15 08:56:28 -05:00
pci.c PCI: Add support for multiple DMA aliases 2016-04-11 14:34:32 -05:00
pci.h PCI: Fold struct pci_vpd_pci22 into struct pci_vpd 2016-02-29 17:47:36 -06:00
probe.c PCI: Add support for multiple DMA aliases 2016-04-11 14:34:32 -05:00
proc.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
quirks.c PCI: Move informational printk to pci_add_dma_alias() 2016-04-11 14:34:27 -05:00
remove.c Merge branch 'pci/resource' into next 2016-03-15 08:56:28 -05:00
rom.c PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY 2016-03-12 06:00:29 -06:00
search.c PCI: Add support for multiple DMA aliases 2016-04-11 14:34:32 -05:00
setup-bus.c PCI: Remove includes of empty asm-generic/pci-bridge.h 2016-02-05 16:28:36 -06:00
setup-irq.c PCI: Export symbols required for loadable host driver modules 2015-04-08 14:17:10 -05:00
setup-res.c PCI: Don't assign or reassign immutable resources 2016-03-08 12:14:31 -06:00
slot.c PCI: Hold pci_slot_mutex while searching bus->slots list 2015-07-30 16:19:53 -05:00
syscall.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
vc.c PCI: Use dev->has_secondary_link to find downstream PCIe links 2015-05-29 15:35:26 -05:00
vpd.c
xen-pcifront.c xen/pcifront: Fix mysterious crashes when NUMA locality information was extracted. 2016-02-15 14:34:57 +00:00