Re: [PATCH v7 9/9] vfio: Remove the pcie check for VFIO_PCI_ERR_IRQ_INDEX

From: Farhan Ali

Date: Tue Jan 20 2026 - 13:56:18 EST



On 1/19/2026 8:56 AM, Julian Ruess wrote:
On Wed Jan 7, 2026 at 7:32 PM CET, Farhan Ali wrote:
We are configuring the error signaling on the vast majority of devices and
it's extremely rare that it fires anyway. This allows userspace to be
notified on errors for legacy PCI devices. The Internal Shared Memory (ISM)
device on s390x is one such device. For PCI devices on IBM s390x error
recovery involves platform firmware and notification to operating system
is done by architecture specific way. So the ISM device can still be
recovered when notified of an error.

Signed-off-by: Farhan Ali <alifm@xxxxxxxxxxxxx>
---
drivers/vfio/pci/vfio_pci_core.c | 6 ++----
drivers/vfio/pci/vfio_pci_intrs.c | 3 +--
2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c
index c92c6c512b24..0fdce5234914 100644
--- a/drivers/vfio/pci/vfio_pci_core.c
+++ b/drivers/vfio/pci/vfio_pci_core.c
@@ -778,8 +778,7 @@ static int vfio_pci_get_irq_count(struct vfio_pci_core_device *vdev, int irq_typ
return (flags & PCI_MSIX_FLAGS_QSIZE) + 1;
}
} else if (irq_type == VFIO_PCI_ERR_IRQ_INDEX) {
- if (pci_is_pcie(vdev->pdev))
- return 1;
+ return 1;
} else if (irq_type == VFIO_PCI_REQ_IRQ_INDEX) {
return 1;
}
@@ -1157,8 +1156,7 @@ static int vfio_pci_ioctl_get_irq_info(struct vfio_pci_core_device *vdev,
case VFIO_PCI_REQ_IRQ_INDEX:
break;
case VFIO_PCI_ERR_IRQ_INDEX:
- if (pci_is_pcie(vdev->pdev))
- break;
+ break;
fallthrough;
Isn't the fallthrough unreachable now?

-- snip --

Yes indeed, I forget why I still had the fallthrough statement. But I don't think that's needed anymore, since we will have explicit break statements for all the valid cases.

Thanks

Farhan