]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vfio/pci: Handle INTx IRQ_NOTCONNECTED
authorAlex Williamson <alex.williamson@redhat.com>
Tue, 11 Mar 2025 23:06:21 +0000 (17:06 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:41:58 +0000 (14:41 +0200)
commit743bb753255d35ebaa74e32a8d32d1012563fef8
treec6da6ae461d94a39c9c1d47517fb75f952b60af8
parent9f51fa1971239fa85099e7480d4e9ba66eb0f469
vfio/pci: Handle INTx IRQ_NOTCONNECTED

[ Upstream commit 860be250fc32de9cb24154bf21b4e36f40925707 ]

Some systems report INTx as not routed by setting pdev->irq to
IRQ_NOTCONNECTED, resulting in a -ENOTCONN error when trying to
setup eventfd signaling.  Include this in the set of conditions
for which the PIN register is virtualized to zero.

Additionally consolidate vfio_pci_get_irq_count() to use this
virtualized value in reporting INTx support via ioctl and sanity
checking ioctl paths since pdev->irq is re-used when the device
is in MSI mode.

The combination of these results in both the config space of the
device and the ioctl interface behaving as if the device does not
support INTx.

Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20250311230623.1264283-1-alex.williamson@redhat.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vfio/pci/vfio_pci_config.c
drivers/vfio/pci/vfio_pci_core.c
drivers/vfio/pci/vfio_pci_intrs.c