Re: [PATCH] iommu/vt-d: Wire up irq_ack() to irq_move_irq() for posted MSIs

From: Thomas Gleixner
Date: Fri Mar 21 2025 - 16:43:48 EST


On Fri, Mar 21 2025 at 12:42, Sean Christopherson wrote:
> Set the posted MSI irq_chip's irq_ack() hook to irq_move_irq() instead of
> a dummy/empty callback so that posted MSIs process pending changes to the
> IRQ's SMP affinity. Failure to honor a pending set-affinity results in
> userspace being unable to change the effective affinity of the IRQ, as
> IRQD_SETAFFINITY_PENDING is never cleared and so irq_set_affinity_locked()
> always defers moving the IRQ.
>
> The issue is most easily reproducible by setting /proc/irq/xx/smp_affinity
> multiple times in quick succession, as only the first update is likely to
> be handled in process context.
>
> Fixes: ed1e48ea4370 ("iommu/vt-d: Enable posted mode for device MSIs")
> Cc: Robert Lippert <rlippert@xxxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Reported-by: Wentao Yang <wentaoyang@xxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>

Reviewed-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>