(`drivers/vfio/pci/vfio_pci_intrs.c:312-314` and `drivers/vfio/pci/vfio_pci_intrs.c:360-361`), so the change is tightly contained and doesn’t leak settings after the device is released. - The fix is small, self-contained, and only touches the legacy INTx path, leaving MSI/MSI-X and modern PCI 2.3 devices untouched. It uses long-standing IRQ APIs with no new dependencies. Given the user-visible failure (guest stops receiving interrupts or risks storms) and the minimal, well-scoped fix, this is a good candidate for stable backporting. Suggested next step: backport to supported stable branches that ship the current VFIO INTx logic. drivers/vfio/pci/vfio_pci_intrs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c index 123298a4dc8f5..61d29f6b3730c 100644 --- a/drivers/vfio/pci/vfio_pci_intrs.c +++ b/drivers/vfio/pci/vfio_pci_intrs.c @@ -304,9 +304,14 @@ static int vfio_intx_enable(struct vfio_pci_core_device *vdev, vdev->irq_type = VFIO_PCI_INTX_IRQ_INDEX; + if (!vdev->pci_2_3) + irq_set_status_flags(pdev->irq, IRQ_DISABLE_UNLAZY); + ret = request_irq(pdev->irq, vfio_intx_handler, irqflags, ctx->name, ctx); if (ret) { + if (!vdev->pci_2_3) + irq_clear_status_flags(pdev->irq, IRQ_DISABLE_UNLAZY); vdev->irq_type = VFIO_PCI_NUM_IRQS; kfree(name); vfio_irq_ctx_free(vdev, ctx, 0); @@ -352,6 +357,8 @@ static void vfio_intx_disable(struct vfio_pci_core_device *vdev) vfio_virqfd_disable(&ctx->unmask); vfio_virqfd_disable(&ctx->mask); free_irq(pdev->irq, ctx); + if (!vdev->pci_2_3) + irq_clear_status_flags(pdev->irq, IRQ_DISABLE_UNLAZY); if (ctx->trigger) eventfd_ctx_put(ctx->trigger); kfree(ctx->name); -- 2.51.0[PATCH AUTOSEL 6.17-6.12] vfio/pci: Fix INTx handling on legacy non-PCI 2.3 devicesSasha Levin undefinedpatches@lists.linux.dev, stable@vger.kernel.org undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined”GƒÇ