linux/drivers/pci/msi
Thomas Gleixner 15c72f824b PCI/MSI: Add support for per device MSI[X] domains
Provide a template and the necessary callbacks to create PCI/MSI and
PCI/MSI-X domains.

The domains are created when MSI or MSI-X is enabled. The domain's lifetime
is either the device lifetime or in case that e.g. MSI-X was tried first
and failed, then the MSI-X domain is removed and a MSI domain is created as
both are mutually exclusive and reside in the default domain ID slot of the
per device domain pointer array.

Also expand pci_msi_domain_supports() to handle feature checks correctly
even in the case that the per device domain was not yet created by checking
the features supported by the MSI parent.

Add the necessary setup calls into the MSI and MSI-X enable code path.
These setup calls are backwards compatible. They return success when there
is no parent domain found, which means the existing global domains or the
legacy allocation path keep just working.

Co-developed-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221124232325.975388241@linutronix.de
2022-12-05 22:22:32 +01:00
..
api.c PCI/MSI: Use bullet lists in kernel-doc comments of api.c 2022-12-05 18:57:46 +01:00
irqdomain.c PCI/MSI: Add support for per device MSI[X] domains 2022-12-05 22:22:32 +01:00
legacy.c PCI/MSI: Prevent UAF in error path 2022-01-21 02:14:46 +01:00
Makefile PCI/MSI: Move pci_disable_msi() to api.c 2022-11-17 15:15:20 +01:00
msi.c PCI/MSI: Add support for per device MSI[X] domains 2022-12-05 22:22:32 +01:00
msi.h PCI/MSI: Add support for per device MSI[X] domains 2022-12-05 22:22:32 +01:00
pcidev_msi.c