Skip to content

iommu: Fix regression in IOMMU grouping

Alex Williamson linux-iommu lkml 1 version Applied

Status from this message: Applied to core, thanks Alex.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2iommu: Rework iommu_group_get_for_pci_dev()drivers/iommu/iommu.c+96 -670 replies
2/2iommu/amd: Split init_iommu_group() from iommu_init_device()drivers/iommu/amd_iommu.c+13 -140 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/2] iommu: Fix regression in IOMMU grouping

We've had surprisingly little fallout from the DMA alias changes, but unfortunately one regression has popped up. We have an AMD system that seems to use the SATA controller to master transactions for the legacy IDE controller and they are different slots on the root complex. The IVRS reports 00:11.0 (SATA) as an alias from 00:14.1 (IDE), which doesn't work with the new, converged PCI IOMMU grouping code, where we've made a simplifying assumption that aliases will be to the same slot.

To fix this, we need to rip out that assumption and write the alias search code that I was unable to come up with previously. I think this can now do the chaining of aliases, which I referenced in the removed comments. Any sort of multi-level aliases are exceptionally unlikely, but I think this code can now handle whatever firmware and alias quirks can throw at it.

I know this is late for 3.17, but this is a regression from the prior code. If reviews and testing can give us the confidence to put it in for 3.17, that would be my preference. I've also marked it for stable in case we want to loop back through that way. Thanks,

Alex

---

Alex Williamson (2):
iommu/amd: Split init_iommu_group() from iommu_init_device()
iommu: Rework iommu_group_get_for_pci_dev()

 drivers/iommu/amd_iommu.c |   27 ++++---
 drivers/iommu/iommu.c     |  163 +++++++++++++++++++++++++++------------------
 2 files changed, 109 insertions(+), 81 deletions(-)