Prevent binding PCI drivers to PCI devices used by non-pci drivers
Status from this message: Applied to iommu/fixes, thanks Jiang.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devicesdrivers/ | +3 | 1 reply | |
| 2/2 | ACPI, PCI: Prevent binding other PCI drivers to IOAPIC PCI devicesdrivers/ | +5 | 1 reply |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Joerg Roedel |
|---|---|
| 1/2 | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Bugfix v4 0/2] Prevent binding PCI drivers to PCI devices used by non-pci drivers
Hi Joerg,
I prepared this patchset yesterday but forgot to send them out.
I think it still worth sending out for review, so here we go:)
---
Commit 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()") breaks suspend/resume on some AMD platforms. The root cause is:
1) AMD IOMMU drivers enables MSI on IOMMU PCI devices at early boot stage
2) PCI driver binding code tries to allocate/free PCI legacy IRQ when binding other PCI drivers to IOMMU PCI devices at later boot stage, and breaks PCI MSI allocation information.
3) System resume breaks when restoring PCI MSI state using the damaged data.
We have tried on solution to detect that a PCI is in use by IOMMU driver by checking pci_msi_enabled(). But that's too specific, actually we should prevent binding PCI drivers to PCI devices used by non-PCI drivers.
Fortunately, we could prevent binding PCI drivers to PCI devices by setting pci_dev->match_driver to false. If needed, we could implement a helper function to manipulate pci_dev->match_driver.
Jiang Liu (2):
iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices ACPI, PCI: Prevent binding other PCI drivers to IOAPIC PCI devices
drivers/acpi/ioapic.c | 7 +++++-- drivers/iommu/amd_iommu_init.c | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.10.4