linux/drivers/vfio
Alex Williamson 2bd42b03ab vfio/pci: Virtualize zero INTx PIN if no pdev->irq
Typically pdev->irq is consistent with whether the device itself
supports INTx, where device support is reported via the PIN register.
Therefore the PIN register is often already zero if pdev->irq is zero.

Recently virtualization of the PIN register was expanded to include
the case where the device supports INTx but the platform does not
route the interrupt.  This is reported by a value of IRQ_NOTCONNECTED
on some architectures.  Other architectures just report zero for
pdev->irq.

We already disallow INTx setup if pdev->irq is zero, therefore add
this to the PIN register virtualization criteria so that a consistent
view is provided to userspace through virtualized config space and
ioctls.

Reported-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Link: https://lore.kernel.org/all/174231895238.2295.12586708771396482526.stgit@linux.ibm.com/
Tested-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Link: https://lore.kernel.org/r/20250320194145.2816379-1-alex.williamson@redhat.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2025-04-14 08:31:45 -06:00
..
cdx module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
fsl-mc vfio/fsl-mc: Remove unused variable 'hwirq' 2024-09-03 08:42:06 -06:00
mdev drivers: core: remove device_link argument from class_compat_[create|remove]_link 2025-01-10 15:42:20 +01:00
pci vfio/pci: Virtualize zero INTx PIN if no pdev->irq 2025-04-14 08:31:45 -06:00
platform vfio/platform: check the bounds of read/write syscalls 2025-01-23 13:13:27 -07:00
Kconfig vfio/migration: Add debugfs to live migration driver 2023-12-04 14:29:08 -07:00
Makefile vfio/migration: Add debugfs to live migration driver 2023-12-04 14:29:08 -07:00
container.c
debugfs.c vfio/migration: Add debugfs to live migration driver 2023-12-04 14:29:08 -07:00
device_cdev.c vfio: VFIO_DEVICE_[AT|DE]TACH_IOMMUFD_PT support pasid 2025-03-25 10:18:31 -03:00
group.c make use of anon_inode_getfile_fmode() 2025-02-21 10:25:31 +01:00
iommufd.c vfio-iommufd: Support pasid [at|de]tach for physical VFIO devices 2025-03-25 10:18:31 -03:00
vfio.h vfio: replace CONFIG_HAVE_KVM with IS_ENABLED(CONFIG_KVM) 2024-02-08 08:45:35 -05:00
vfio_iommu_spapr_tce.c vfio/spapr: Always clear TCEs before unsetting the window 2024-06-28 17:03:39 +10:00
vfio_iommu_type1.c vfio/type1: Use mapping page mask for pfnmaps 2025-02-27 11:55:54 -07:00
vfio_main.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
virqfd.c assorted variants of irqfd setup: convert to CLASS(fd) 2024-11-03 01:28:07 -05:00