PCI/MSI, x86: Cure a couple of inconsistencies
Status from this message: The following commit has been merged into the irq/core branch of tip:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest19 patches 3 repliesApplied
- v18 patches 21 repliesSuperseded
Changes in v2 from the cover letter
- Identified and addressed more inconsistencies, especially the lack of serialization for multi-MSI masking
- Removed the extra vector masking in S390
- Addressed review comments and picked up tags where applicable
- Clean up of the naming of msi_desc::masked as discussed in the V1 thread
- Consolidation of the mask/unmask functions
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/19 | PCI/MSI: Enable and mask MSI-X earlydrivers/ | +15 | 0 replies | |
| 2/19 | PCI/MSI: Mask all unused MSI-X entriesdrivers/ | +27 | 0 replies | |
| 3/19 | PCI/MSI: Enforce that MSI-X table entry is masked for updatedrivers/ | +15 | 0 replies | |
| 4/19 | PCI/MSI: Enforce MSI[X] entry updates to be visibledrivers/ | +5 | 0 replies | |
| 5/19 | PCI/MSI: Do not set invalid bits in MSI maskdrivers/ | +4 | 0 replies | |
| 6/19 | PCI/MSI: Correct misleading commentsdrivers/ | +1 | 0 replies | |
| 7/19 | PCI/MSI: Use msi_mask_irq() in pci_msi_shutdown()drivers/ | +1 | 0 replies | |
| 8/19 | PCI/MSI: Protect msi_desc::masked for multi-MSIdrivers/ drivers/ include/ +1 more | +13 | 0 replies | |
| 9/19 | genirq: Provide IRQCHIP_AFFINITY_PRE_STARTUPinclude/ kernel/ | +6 | 0 replies | |
| 10/19 | x86/ioapic: Force affinity setup before startuparch/ | +4 | 0 replies | |
| 11/19 | x86/msi: Force affinity setup before startuparch/ arch/ | +9 | 0 replies | |
| 12/19 | s390/pci: Do not mask MSI[-X] entries on teardownarch/ drivers/ include/ | +2 | 1 reply | |
| 13/19 | PCI/MSI: Simplify msi_verify_entries()drivers/ | +4 | 0 replies | |
| 14/19 | PCI/MSI: Rename msi_desc::maskeddrivers/ include/ | +21 | 0 replies | |
| 15/19 | PCI/MSI: Consolidate error handling in msi_capability_init()drivers/ | +11 | 0 replies | |
| 16/19 | PCI/MSI: Deobfuscate virtual MSI-Xdrivers/ | +8 | 0 replies | |
| 17/19 | PCI/MSI: Cleanup msi_mask()drivers/ | +11 | 0 replies | |
| 18/19 | PCI/MSI: Provide a new set of mask and unmask functionsdrivers/ | +72 | 2 replies | |
| 19/19 | PCI/MSI: Use new mask/unmask functionsdrivers/ | +21 | 0 replies |
Reviews trailers per patch
9 of 19 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Ashok Raj | Marc Zyngier | Bjorn Helgaas | Niklas Schnelle |
|---|---|---|---|---|
| Series | R-b T-b | |||
| 1/19 | R-b | R-b | A-b | |
| 2/19 | R-b | A-b | ||
| 3/19 | R-b | A-b | ||
| 4/19 | R-b | A-b | ||
| 5/19 | ||||
| 6/19 | ||||
| 7/19 | ||||
| 8/19 | ||||
| 9/19 | R-b | |||
| 10/19 | R-b | |||
| 11/19 | R-b | |||
| 12/19 | A-b T-b | |||
| 13/19 | R-b | A-b | ||
| 14/19 | ||||
| 15/19 | ||||
| 16/19 | ||||
| 17/19 | ||||
| 18/19 | ||||
| 19/19 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [patch V2 00/19] PCI/MSI, x86: Cure a couple of inconsistencies
A recent discussion about the PCI/MSI management for virtio unearthed a violation of the MSI-X specification vs. writing the MSI-X message: under certain circumstances the entry is written without being masked.
While looking at that and the related violation of the x86 non-remapped interrupt affinity mechanism a few other issues were discovered by inspection.
The following series addresses these.
Note this does not fix the virtio issue, but while staring at the above problems I came up with a plan to address this. I'm still trying to convince myself that I can get away without sprinkling locking all over the place, so don't hold your breath that this will materialize tomorrow.
The series is also available from git:
git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git irq/msi
V1 can be found here:
https://lore.kernel.org/r/[email protected]
Changes vs. V1:
- Identified and addressed more inconsistencies, especially the lack of serialization for multi-MSI masking
- Removed the extra vector masking in S390
- Addressed review comments and picked up tags where applicable
- Clean up of the naming of msi_desc::masked as discussed in the V1 thread
- Consolidation of the mask/unmask functions
Thanks,
tglx
--- arch/s390/pci/pci_irq.c | 4 arch/x86/kernel/apic/io_apic.c | 6 arch/x86/kernel/apic/msi.c | 11 + arch/x86/kernel/hpet.c | 2 drivers/base/core.c | 1 drivers/pci/msi.c | 274 ++++++++++++++++++++++------------------- include/linux/device.h | 1 include/linux/irq.h | 2 include/linux/msi.h | 10 - kernel/irq/chip.c | 5 10 files changed, 178 insertions(+), 138 deletions(-)