mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
vfio/pci: Remove the pcie check for VFIO_PCI_ERR_IRQ_INDEX
The error signaling is configured for the vast majority of devices and it's extremely rare that it fires anyway. Removing the pcie check will allow userspace to be notified on errors for legacy PCI devices. The Internal Shared Memory (ISM) device on s390 is one such device. For PCI devices on IBM s390 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. Reviewed-by: Julian Ruess <julianr@linux.ibm.com> Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com> Reviewed-by: Alex Williamson <alex@shazbot.org> Signed-off-by: Farhan Ali <alifm@linux.ibm.com> Link: https://lore.kernel.org/r/20260630165553.725-4-alifm@linux.ibm.com Signed-off-by: Alex Williamson <alex@shazbot.org>
This commit is contained in:
parent
fa63a2e3f9
commit
4e3c1fc8ab
|
|
@ -880,8 +880,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;
|
||||
}
|
||||
|
|
@ -1257,11 +1256,8 @@ static int vfio_pci_ioctl_get_irq_info(struct vfio_pci_core_device *vdev,
|
|||
switch (info.index) {
|
||||
case VFIO_PCI_INTX_IRQ_INDEX ... VFIO_PCI_MSIX_IRQ_INDEX:
|
||||
case VFIO_PCI_REQ_IRQ_INDEX:
|
||||
break;
|
||||
case VFIO_PCI_ERR_IRQ_INDEX:
|
||||
if (pci_is_pcie(vdev->pdev))
|
||||
break;
|
||||
fallthrough;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -859,8 +859,7 @@ int vfio_pci_set_irqs_ioctl(struct vfio_pci_core_device *vdev, uint32_t flags,
|
|||
case VFIO_PCI_ERR_IRQ_INDEX:
|
||||
switch (flags & VFIO_IRQ_SET_ACTION_TYPE_MASK) {
|
||||
case VFIO_IRQ_SET_ACTION_TRIGGER:
|
||||
if (pci_is_pcie(vdev->pdev))
|
||||
func = vfio_pci_set_err_trigger;
|
||||
func = vfio_pci_set_err_trigger;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user