Re: [PATCH v2 3/3] x86/irq, iommu/amd, PCI: Drop redundant irq_retrigger inits

From: Thomas Gleixner

Date: Wed Sep 09 2026 - 06:31:03 EST


On Mon, Aug 10 2026 at 09:07, Naman Jain wrote:
> --- a/arch/x86/kernel/apic/msi.c
> +++ b/arch/x86/kernel/apic/msi.c
> @@ -137,7 +137,7 @@ msi_set_affinity(struct irq_data *irqd, const struct cpumask *mask, bool force)
> * IRR.
> */
> if (lapic_vector_set_in_irr(cfg->vector))
> - irq_data_get_irq_chip(irqd)->irq_retrigger(irqd);
> + irq_chip_retrigger_hierarchy(irqd);

That's broken because irqd points at the vector domain already, so there
is no parent and nothing gets retriggered.

Let's look at the hierarchy when interrupt remapping is enabled:

| --- [DMAR]
[VECTOR] --- | | -- [IOAPIC]
| --- [REMAP] ---| -- [HPET]
| -- [DEVICE MSI]

All outer domains have .irq_set_affinity = msi_domain_set_affinity,
which does:

msi_domain_set_affinity(irqdata, ....)

irqdata->parent->irq_set_affinity(irqdata->parent, ....);

In that case msi_set_affinity() is only reachable for the DMAR domain
and all others (IOAPIC, HPET, DEVICE MSI) end up in the REMAP domain
which handles irq_set_affinity and never ends up in the above code.

In the non-remapping case:

| -- [IOAPIC]
[VECTOR] --- | -- [HPET]
| -- [DEVICE MSI]

In this case the vector domain is the MSI parent domain for all of them
and all outer domains will end up in msi_set_affinity() via
msi_domain_set_affinity().

In any case 'irqd' in msi_set_affinity() will always point to the vector
domain and therefore the exiting code is correct and can't be changed to
retrigger hierarchy as that would see irqd->parent == NULL and do
nothing. Neither will adding a conditional there do anything useful
because the vector domain always has the retrigger callback set.

Thanks,

tglx