[patch V2 00/19] PCI/MSI, x86: Cure a couple of inconsistencies

Thomas Gleixner
2021-07-29T22:34:43Z

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/20210721191126.274946280@linutronix.de

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(-)