Skip to content

RFC pci/iommu: PCIe requester ID interface

Alex Williamson linux-iommu linux-pci 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 RFC Latest0 of 2 patches 0 repliesNew

Patches in v2 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 0/2] pci/iommu: PCIe requester ID interface

v2: second pass at refining the interface. Rolled pci_requester_id into pci_get_visible_pcie_requester. Fixed some bus walk issues.

Another obscure issue that I forgot to mention that this should fix is gaps in requester IDs. If you had:

---pcie--->[pcie2pci]---pci--->[pci2pcie]---pcie--->[endpoint]

I think the current code would try to use the endpoint requester id and fail. This code will use the pcie2pci->secondary as the requester id. This may not even be that obscure of a bug if a PCIe ASIC is soldered to a pci2pcie bridge to make a compatible conventional PCI card.

The diffstat for pci improves a bit when we remove:
pci_find_upstream_pci_bridge:

 drivers/iommu/intel-iommu.c         |  164 ++++++++++-----------------
 drivers/iommu/intel_irq_remapping.c |    2 
 drivers/pci/search.c                |  215 +++++++++++++++++++++++++++++++-----
 include/linux/pci.h                 |   16 +-
 4 files changed, 260 insertions(+), 137 deletions(-)

Comments? Thanks,

Alex

---

Alex Williamson (2):
pci: Create PCIe requester ID interface iommu/intel: Make use of PCIe requester ID interface

 drivers/iommu/intel-iommu.c         |  164 +++++++++++------------------
 drivers/iommu/intel_irq_remapping.c |    2 
 drivers/pci/search.c                |  198 +++++++++++++++++++++++++++++++++++
 include/linux/pci.h                 |    7 +
 4 files changed, 270 insertions(+), 101 deletions(-)