summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@nvidia.com>2026-08-05 00:20:58 +0000
committerAlex Williamson <alex@shazbot.org>2026-08-10 13:24:40 -0600
commitaabaf84560e0737eeba0927395d04a813cbec8c0 (patch)
tree43bd4290ed671e4f1cb5089c84c070c38ccc9f6a /scripts/stackusage
parent6edd69813b2d8c30c24a86052065a5dbf390a3cd (diff)
downloadlinux-aabaf84560e0737eeba0927395d04a813cbec8c0.tar.gz
linux-aabaf84560e0737eeba0927395d04a813cbec8c0.zip
vfio: selftests: Add helpers to re-enable interrupts
Selftest drivers that recover from a fault by issuing VFIO_DEVICE_RESET need to re-arm device interrupts afterwards. VFIO_DEVICE_RESET tears down the kernel-side IRQ trigger so a subsequent VFIO_DEVICE_SET_IRQS is required, but the user-side eventfds (and any fd cached in a test fixture) are still valid and must be preserved. vfio_pci_irq_enable() refuses to be called for vectors that already have an eventfd (VFIO_ASSERT_LT), and vfio_pci_irq_disable() closes all eventfds before resetting the trigger, so neither is suitable. Add vfio_pci_irq_reenable(device, index, vector, count) which asserts that the requested range has existing eventfds and re-issues VFIO_DEVICE_SET_IRQS using them. Signature mirrors vfio_pci_irq_enable(). Add vfio_pci_msi{,x}_reenable() wrappers around vfio_pci_irq_reenable() for additional ease of use and readability. Assisted-by: Claude:claude-opus-4-7 Signed-off-by: Alex Williamson <alex.williamson@nvidia.com> Reviewed-by: David Matlack <dmatlack@google.com> Acked-by: David Matlack <dmatlack@google.com> Link: https://lore.kernel.org/r/20260805-igb_v3_b4-v10-1-9c86dc849c0d@google.com Signed-off-by: Alex Williamson <alex@shazbot.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions