x86/irq: Fix lost interrupts on CPU hot-unplug
Subsystems (8)
v5 cover x86/irq: Fix lost interrupts on CPU hot-unplug
On CPU hot-unplug, fixup_irqs() re-injects interrupts that are still pending in the outgoing CPU's IRR via the irqchip's irq_retrigger() callback. The Hyper-V root partition PCI/MSI irqchip lost that callback when it was converted to msi_create_parent_irq_domain(), so such a pending interrupt is silently dropped, leading to lost interrupts, stalls and "No irq handler for vector" messages.
Patch 1 is the minimal, backportable fix (Fixes:/Cc: stable) that restores irq_chip_retrigger_hierarchy() on the Hyper-V root partition PCI/MSI chip. The equivalent guest pci-hyperv.c fix from the previous version is already merged, so it is dropped here.
Patch 2 then switches fixup_irqs() to have a fallback call to irq_chip_retrigger_hierarchy() directly
Patch 3 makes a similar change in msi_set_affinity()
Patch 4 then drops the now-redundant irq_retrigger() initializations. This way, patch 2-4 do not need to be backported.
Changes since v4:
https://lore.kernel.org/all/[email protected]/
* Discussion between Thomas and Michael concluded that if-else check for irq_retrigger callback is not required, and irq_chip_retrigger_hierarchy() can safely replace all irq_retrigger invocations. Make the change to remove if-else blocks and update commit msg accordingly. Older series could not be picked because there was a genuine change in patch 1 of this series.
Changes since v3:
https://lore.kernel.org/all/[email protected]/
* Move irq_retrigger setting to hv_init_dev_msi_info() in patch 1 (Michael, Nam)
* Add if-else fallback check in msi_set_affinity() in patch 3 (Michael)
* Break patch 3 into two separate patches, while *keeping review tags*.
Changes since v2:
https://lore.kernel.org/all/[email protected]/
* Add a backportable fix for Hyper-V root partition irqchip (Wei)
* Add a check for custom irq_retrigger implementations and add direct irq_chip_retrigger_hierarchy() calls as a fallback if it is not defined by a chip. (Sashiko, Michael)
* Removed local loop variable change, and continue using the irq_desc accessor function (Michael)
* Did not pick "Acked-by: Manivannan Sadhasivam" as it was on v1, and v3 is a functionally different to some extent, specially patch 2. Requesting you to please review again.
Changes since v1:
https://lore.kernel.org/all/[email protected]/#t
* Added Review tags
* Adding minor clarification in commit msg of patch 2 (Shradha)
Original RFC: https://lore.kernel.org/all/87y0f3jhd6.ffs@fw13/
Naman Jain (4):
x86/hyperv: Set irq_retrigger for root partition PCI/MSI irqchip x86/irq: Use irq_chip_retrigger_hierarchy() in fixup_irqs() x86/irq: Use irq_chip_retrigger_hierarchy() in msi_set_affinity() x86/irq, iommu/amd, x86/hyperv, PCI: Drop redundant irq_retrigger
inits
arch/x86/kernel/apic/io_apic.c | 2 -- arch/x86/kernel/apic/msi.c | 4 +--- arch/x86/kernel/hpet.c | 1 - arch/x86/kernel/irq.c | 18 ++++++++---------- drivers/iommu/amd/init.c | 1 - drivers/pci/controller/pci-hyperv.c | 1 - 6 files changed, 9 insertions(+), 18 deletions(-)
base-commit: 68142f986ff04b2b70b31db00f719bf690f64a9a
Signature · 1 line
2.43.0
PATCH v5 1/4 x86/hyperv: Set irq_retrigger for root partition PCI/MSI irqchip
The Hyper-V root partition vPCI MSI irqchip lost its irq_retrigger() callback when it was converted to msi_create_parent_irq_domain(). The callback was present on the original irqchip and was dropped during that conversion.
On CPU hot-unplug fixup_irqs() migrates the interrupts which are affine to the outgoing CPU to a new target. If an interrupt still has its pending bit set in the outgoing CPU's IRR at that point, fixup_irqs() resends it on the new target through the irqchip's irq_retrigger() callback. As the root partition PCI/MSI chip no longer provides that callback, the pending interrupt is silently dropped, which can result in lost interrupts, stalls and "No irq handler for vector" messages during CPU hotplug.
Restore irq_chip_retrigger_hierarchy() as the irq_retrigger() callback for the root partition PCI/MSI irqchip, so that a pending interrupt is resent on its new target CPU via the parent x86 vector domain.
--- arch/x86/hyperv/irqdomain.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/hyperv/irqdomain.c +1 -0
@@ -316,6 +316,7 @@ static bool hv_init_dev_msi_info(struct device *dev, struct irq_domain *domain,return false; chip->flags |=IRQCHIP_SKIP_SET_WAKE |IRQCHIP_MOVE_DEFERRED ; + chip->irq_retrigger = irq_chip_retrigger_hierarchy; info->ops->msi_prepare = pci_msi_prepare;
Signature · 1 line
2.43.0
[email protected]
AI reviewRe: [PATCH v5 1/4] x86/hyperv: Set irq_retrigger for root partition PCI/MSI irqchip
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 17 lines
The Hyper-V root partition vPCI MSI irqchip lost its
irq_retrigger()callback when it was converted tomsi_create_parent_irq_domain(). The callback was present on the original irqchip and was dropped during that conversion.On CPU hot-unplug
fixup_irqs()migrates the interrupts which are affine to the outgoing CPU to a new target. If an interrupt still has its pending bit set in the outgoing CPU's IRR at that point,fixup_irqs()resends it on the new target through the irqchip'sirq_retrigger()callback. As the root partition PCI/MSI chip no longer provides that callback, the pending interrupt is silently dropped, which can result in lost interrupts, stalls and "No irq handler for vector" messages during CPU hotplug.Restore
irq_chip_retrigger_hierarchy()as theirq_retrigger()callback for the root partition PCI/MSI irqchip, so that a pending interrupt is resent on its new target CPU via the parent x86 vector domain.
Quoted 5 lines
Fixes 4691db0704ac ("x86/hyperv: Switch to msi_create_parent_irq_domain()")Reviewed-by Michael Kelley <[email protected]>Reviewed-by Nam Cao <[email protected]>Signed-off-by Naman Jain <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
PATCH v5 2/4 x86/irq: Use irq_chip_retrigger_hierarchy() in fixup_irqs()
In reply to Naman Jainfixup_irqs() re-injects a pending interrupt on its new target CPU by looking at the outermost domain chip and invoking its irq_retrigger() callback directly. When the outermost chip does not implement irq_retrigger(), the pending interrupt is silently dropped, which can lead to lost interrupts on CPU hot-unplug.
Use irq_chip_retrigger_hierarchy() instead, which walks up the interrupt hierarchy until it finds a chip that implements irq_retrigger().
While at it, use a scoped guard for desc->lock. VECTOR_RETRIGGERED is now set only when the retrigger succeeds instead of unconditionally, which is harmless today since apic_retrigger_irq() always returns 1.
--- arch/x86/kernel/irq.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)
arch/x86/kernel/irq.c +8 -10
@@ -469,7 +469,7 @@ void fixup_irqs(void)unsigned int vector;struct irq_desc *desc;struct irq_data *data; -struct irq_chip *chip; +int ret;irq_migrate_all_off_this_cpu ();
@@ -490,21 +490,19 @@ void fixup_irqs(void)* nothing else will touch it. */ for (vector =FIRST_EXTERNAL_VECTOR ; vector <NR_VECTORS ; vector++) { -if (IS_ERR_OR_NULL (__this_cpu_read (vector_irq[vector]))) + desc =__this_cpu_read (vector_irq[vector]); + +if (IS_ERR_OR_NULL (desc))continue ;if (is_vector_pending (vector)) { - desc =__this_cpu_read (vector_irq[vector]); - -raw_spin_lock (&desc->lock); +guard (raw_spinlock)(&desc->lock); data =irq_desc_get_irq_data (desc); - chip =irq_data_get_irq_chip (data); -if (chip->irq_retrigger) { - chip->irq_retrigger (data); + ret =irq_chip_retrigger_hierarchy (data); +if (ret)__this_cpu_write (vector_irq[vector],VECTOR_RETRIGGERED ); - } -raw_spin_unlock (&desc->lock); } +if (__this_cpu_read (vector_irq[vector]) !=VECTOR_RETRIGGERED )__this_cpu_write (vector_irq[vector],VECTOR_UNUSED ); }
Signature · 1 line
2.43.0
[email protected]
AI reviewRe: [PATCH v5 2/4] x86/irq: Use irq_chip_retrigger_hierarchy() in fixup_irqs()
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] The use of irq_chip_retrigger_hierarchy() silently drops pending interrupts for root-level…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The use of irq_chip_retrigger_hierarchy() silently drops pending interrupts for root-level irq_chips (like lapic_controller) during CPU hotplug, because it intentionally bypasses the outermost chip. --
commit 25a8009ce9e28c732ed15d13383d7819cd1539c8
Author: Naman Jain <[email protected]>
x86/irq: Use irq_chip_retrigger_hierarchy() in fixup_irqs()
This patch modifies fixup_irqs() to re-inject pending interrupts by walking the interrupt hierarchy using irq_chip_retrigger_hierarchy(), rather than relying solely on the outermost chip. It also introduces scoped guards for the descriptor locks and conditionally sets VECTOR_RETRIGGERED only when the retrigger operation succeeds.
Quoted 3 lines
arch/x86/kernel/irq.c +0
-0
[ ... ]
Quoted 1 line
arch/x86/kernel/irq.c +0
-0@@ -490,21 +490,19 @@ void fixup_irqs(void)
[ ... ]
Quoted 5 lines
arch/x86/kernel/irq.c +1
-3if (is_vector_pending (vector)) { - desc =__this_cpu_read (vector_irq[vector]); - -raw_spin_lock (&desc->lock); +guard (raw_spinlock)(&desc->lock);
arch/x86/kernel/irq.c void fixup_irqs(void) · line 504
Quoted 10 lines
arch/x86/kernel/irq.c +2
-5data =irq_desc_get_irq_data (desc); - chip =irq_data_get_irq_chip (data); -if (chip->irq_retrigger) { - chip->irq_retrigger (data); + ret =irq_chip_retrigger_hierarchy (data); +if (ret)__this_cpu_write (vector_irq[vector],VECTOR_RETRIGGERED ); - } -raw_spin_unlock (&desc->lock); }
[Severity: High]
Does this silently drop pending interrupts for root-level irq_chips like lapic_controller?
Looking at irq_chip_retrigger_hierarchy(), it initializes its loop by stepping immediately to the parent data:
kernel/irq/chip.c:irq_chip_retrigger_hierarchy() {
for (data = data->parent_data; data; data = data->parent_data)
if (data->chip && data->chip->irq_retrigger)
return data->chip->irq_retrigger(data);
return 0;
}If the interrupt relies on a non-hierarchical root domain where parent_data is NULL, this loop will immediately exit and return 0. The valid irq_retrigger callback on the outermost leaf chip is never executed.
Could this lead to lost hardware interrupts (such as legacy timer or ISA interrupts) during CPU hot-unplug for these devices?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
PATCH v5 3/4 x86/irq: Use irq_chip_retrigger_hierarchy() in msi_set_affinity()
In reply to Naman Jainmsi_set_affinity() re-injects a pending interrupt on its new target by looking at the outermost domain chip and invoking its irq_retrigger() callback. Since this mirrors the behavior of irq_chip_retrigger_hierarchy(), use the helper directly instead.
--- arch/x86/kernel/apic/msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/apic/msi.c +1 -1
@@ -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);return ret; }
Signature · 1 line
2.43.0
[email protected]
AI reviewRe: [PATCH v5 3/4] x86/irq: Use irq_chip_retrigger_hierarchy() in msi_set_affinity()
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 9 lines
msi_set_affinity()re-injects a pending interrupt on its new target by looking at the outermost domain chip and invoking itsirq_retrigger()callback. Since this mirrors the behavior ofirq_chip_retrigger_hierarchy(), use the helper directly instead.Suggested-by Thomas Gleixner <[email protected]>Reviewed-by Shradha Gupta <[email protected]>Reviewed-by Thomas Gleixner <[email protected]>Signed-off-by Naman Jain <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
RE: [PATCH v5 3/4] x86/irq: Use irq_chip_retrigger_hierarchy() in msi_set_affinity()
In reply to Naman JainFrom: Naman Jain <[email protected]> Sent: Monday, September 14, 2026 4:19 AM
Quoted 5 lines
msi_set_affinity()re-injects a pending interrupt on its new target by looking at the outermost domain chip and invoking itsirq_retrigger()callback. Since this mirrors the behavior ofirq_chip_retrigger_hierarchy(), use the helper directly instead.
This commit message glosses over the key point. I think the full statement is that in all cases where msi_set_affinity() is called, the irqchip's .irq_retrigger function is set to irq_chip_retrigger_hierarchy(). Both are set only in x86_init_dev_msi_info(). So it is equivalent to just call irq_chip_retrigger_hierarchy() directly.
Quoted 25 lines
Suggested-by Thomas Gleixner <[email protected]>Reviewed-by Shradha Gupta <[email protected]>Reviewed-by Thomas Gleixner <[email protected]>Signed-off-by Naman Jain <[email protected]>--- arch/x86/kernel/apic/msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/kernel/apic/msi.c +1
-2@@ -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);return ret; } --2.43.0
Re: [PATCH v5 3/4] x86/irq: Use irq_chip_retrigger_hierarchy() in msi_set_affinity()
Quoted 7 lines · Michael Kelley
From: Naman Jain <[email protected]> Sent: Monday, September 14, 2026 4:19 AM
Quoted 5 lines
msi_set_affinity()re-injects a pending interrupt on its new target by looking at the outermost domain chip and invoking itsirq_retrigger()callback. Since this mirrors the behavior ofirq_chip_retrigger_hierarchy(), use the helper directly instead.
Quoted 5 lines
This commit message glosses over the key point. I think the full statement is that in all cases where
msi_set_affinity()is called, the irqchip's .irq_retrigger function is set toirq_chip_retrigger_hierarchy(). Both are set only inx86_init_dev_msi_info(). So it is equivalent to just callirq_chip_retrigger_hierarchy()directly.
I'll add this info in next version.
Thanks,
Naman
Quoted 26 lines
Quoted 26 lines
Suggested-by Thomas Gleixner <[email protected]>Reviewed-by Shradha Gupta <[email protected]>Reviewed-by Thomas Gleixner <[email protected]>Signed-off-by Naman Jain <[email protected]>--- arch/x86/kernel/apic/msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/kernel/apic/msi.c +1
-2@@ -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);return ret; } --2.43.0
PATCH v5 4/4 x86/irq, iommu/amd, x86/hyperv, PCI: Drop redundant irq_retrigger inits
In reply to Naman JainWith fixup_irqs(), msi_set_affinity() and the generic resend path (try_retrigger()) now all falling back to irq_chip_retrigger_hierarchy(), installing it as the irq_retrigger() callback on the outermost domain chips is no longer required. The hierarchy walk reaches the x86 vector domain's apic_retrigger_irq() for all of these stacked domain chips.
Remove the now redundant irq_retrigger() initializations from the outermost domain interrupt chips, including the Hyper-V root partition PCI/MSI chip.
No functional change intended.
--- arch/x86/hyperv/irqdomain.c | 1 - arch/x86/kernel/apic/io_apic.c | 2 -- arch/x86/kernel/apic/msi.c | 2 -- arch/x86/kernel/hpet.c | 1 - drivers/iommu/amd/init.c | 1 - drivers/pci/controller/pci-hyperv.c | 1 - 6 files changed, 8 deletions(-)
arch/x86/hyperv/irqdomain.c +0 -1
@@ -316,7 +316,6 @@ static bool hv_init_dev_msi_info(struct device *dev, struct irq_domain *domain,return false; chip->flags |=IRQCHIP_SKIP_SET_WAKE |IRQCHIP_MOVE_DEFERRED ; - chip->irq_retrigger = irq_chip_retrigger_hierarchy; info->ops->msi_prepare = pci_msi_prepare;
arch/x86/kernel/apic/io_apic.c +0 -2
@@ -1857,7 +1857,6 @@ static struct irq_chip ioapic_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ack_level, .irq_set_affinity = ioapic_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_get_irqchip_state = ioapic_irq_get_chip_state, .flags =IRQCHIP_SKIP_SET_WAKE |IRQCHIP_MOVE_DEFERRED | IRQCHIP_AFFINITY_PRE_STARTUP,
@@ -1871,7 +1870,6 @@ static struct irq_chip ioapic_ir_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ir_ack_level, .irq_set_affinity = ioapic_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_get_irqchip_state = ioapic_irq_get_chip_state, .flags =IRQCHIP_SKIP_SET_WAKE | IRQCHIP_AFFINITY_PRE_STARTUP,
arch/x86/kernel/apic/msi.c +0 -2
@@ -246,7 +246,6 @@ static bool x86_init_dev_msi_info(struct device *dev, struct irq_domain *domain, info->ops->msi_prepare = x86_msi_prepare; info->chip->irq_ack = irq_chip_ack_parent; - info->chip->irq_retrigger = irq_chip_retrigger_hierarchy; info->chip->flags |=IRQCHIP_SKIP_SET_WAKE |IRQCHIP_AFFINITY_PRE_STARTUP ;
@@ -313,7 +312,6 @@ static struct irq_chip dmar_msi_controller = { .irq_mask = dmar_msi_mask, .irq_ack = irq_chip_ack_parent, .irq_set_affinity = msi_domain_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_compose_msi_msg = dmar_msi_compose_msg, .irq_write_msi_msg = dmar_msi_write_msg, .flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MOVE_DEFERRED |
arch/x86/kernel/hpet.c +0 -1
@@ -509,7 +509,6 @@ static struct irq_chip hpet_msi_controller __ro_after_init = { .irq_mask = hpet_msi_mask, .irq_ack = irq_chip_ack_parent, .irq_set_affinity = msi_domain_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_write_msi_msg = hpet_msi_write_msg, .flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_AFFINITY_PRE_STARTUP, };
drivers/iommu/amd/init.c +0 -1
@@ -2477,7 +2477,6 @@ static struct irq_chip intcapxt_controller = { .irq_unmask = intcapxt_unmask_irq, .irq_mask = intcapxt_mask_irq, .irq_ack = irq_chip_ack_parent, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_set_affinity = intcapxt_set_affinity, .irq_set_wake = intcapxt_set_wake, .flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_MOVE_DEFERRED,
drivers/pci/controller/pci-hyperv.c +0 -1
@@ -2119,7 +2119,6 @@ static bool hv_pcie_init_dev_msi_info(struct device *dev, struct irq_domain *dom info->ops->msi_prepare = hv_msi_prepare; chip->irq_set_affinity = irq_chip_set_affinity_parent; - chip->irq_retrigger = irq_chip_retrigger_hierarchy;if (IS_ENABLED (CONFIG_X86 )) chip->flags |=IRQCHIP_MOVE_DEFERRED ;
Signature · 1 line
2.43.0
[email protected]
AI reviewRe: [PATCH v5 4/4] x86/irq, iommu/amd, x86/hyperv, PCI: Drop redundant irq_retrigger inits
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 9 lines
With
fixup_irqs(),msi_set_affinity()and the generic resend path (try_retrigger()) now all falling back toirq_chip_retrigger_hierarchy(), installing it as theirq_retrigger()callback on the outermost domain chips is no longer required. The hierarchy walk reaches the x86 vector domain'sapic_retrigger_irq()for all of these stacked domain chips.Remove the now redundant
irq_retrigger()initializations from the outermost domain interrupt chips, including the Hyper-V root partition PCI/MSI chip.
Quoted 6 lines
No functional change intended.
Suggested-by Thomas Gleixner <[email protected]>Reviewed-by Shradha Gupta <[email protected]>Reviewed-by Thomas Gleixner <[email protected]>Signed-off-by Naman Jain <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
RE: [PATCH v5 4/4] x86/irq, iommu/amd, x86/hyperv, PCI: Drop redundant irq_retrigger inits
In reply to Naman JainFrom: Naman Jain <[email protected]> Sent: Monday, September 14, 2026 4:19 AM
Quoted 3 lines
With
fixup_irqs(),msi_set_affinity()and the generic resend path (try_retrigger()) now all falling back toirq_chip_retrigger_hierarchy(),
The "falling back" terminology is not accurate in this version of the patch set. Perhaps "all now calling irq_chip_retrigger_hierarchy() directly"?
Quoted 119 lines
installing it as the
irq_retrigger()callback on the outermost domain chips is no longer required. The hierarchy walk reaches the x86 vector domain'sapic_retrigger_irq()for all of these stacked domain chips.Remove the now redundant
irq_retrigger()initializations from the outermost domain interrupt chips, including the Hyper-V root partition PCI/MSI chip.No functional change intended.
Suggested-by Thomas Gleixner <[email protected]>Reviewed-by Shradha Gupta <[email protected]>Reviewed-by Thomas Gleixner <[email protected]>Signed-off-by Naman Jain <[email protected]>--- arch/x86/hyperv/irqdomain.c | 1 - arch/x86/kernel/apic/io_apic.c | 2 -- arch/x86/kernel/apic/msi.c | 2 -- arch/x86/kernel/hpet.c | 1 - drivers/iommu/amd/init.c | 1 - drivers/pci/controller/pci-hyperv.c | 1 - 6 files changed, 8 deletions(-)arch/x86/hyperv/irqdomain.c +0
-1@@ -316,7 +316,6 @@ static bool hv_init_dev_msi_info(struct device *dev, structirq_domain *domain, return false; chip->flags |=IRQCHIP_SKIP_SET_WAKE |IRQCHIP_MOVE_DEFERRED ; - chip->irq_retrigger = irq_chip_retrigger_hierarchy; info->ops->msi_prepare = pci_msi_prepare;arch/x86/kernel/apic/io_apic.c +0
-1@@ -1857,7 +1857,6 @@ static struct irq_chip ioapic_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ack_level, .irq_set_affinity = ioapic_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_get_irqchip_state = ioapic_irq_get_chip_state, .flags = IRQCHIP_SKIP_SET_WAKE |
IRQCHIP_MOVE_DEFERRED|arch/x86/kernel/apic/io_apic.c +0
-1IRQCHIP_AFFINITY_PRE_STARTUP,@@ -1871,7 +1870,6 @@ static struct irq_chip ioapic_ir_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ir_ack_level, .irq_set_affinity = ioapic_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_get_irqchip_state = ioapic_irq_get_chip_state, .flags =IRQCHIP_SKIP_SET_WAKE | IRQCHIP_AFFINITY_PRE_STARTUP,arch/x86/kernel/apic/msi.c +0
-2@@ -246,7 +246,6 @@ static bool x86_init_dev_msi_info(struct device *dev, struct irq_domain *domain, info->ops->msi_prepare = x86_msi_prepare; info->chip->irq_ack = irq_chip_ack_parent; - info->chip->irq_retrigger = irq_chip_retrigger_hierarchy; info->chip->flags |=IRQCHIP_SKIP_SET_WAKE |IRQCHIP_AFFINITY_PRE_STARTUP ;@@ -313,7 +312,6 @@ static struct irq_chip dmar_msi_controller = { .irq_mask = dmar_msi_mask, .irq_ack = irq_chip_ack_parent, .irq_set_affinity = msi_domain_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_compose_msi_msg = dmar_msi_compose_msg, .irq_write_msi_msg = dmar_msi_write_msg, .flags = IRQCHIP_SKIP_SET_WAKE |
IRQCHIP_MOVE_DEFERRED|arch/x86/kernel/hpet.c +0
-1@@ -509,7 +509,6 @@ static struct irq_chip hpet_msi_controller __ro_after_init = { .irq_mask = hpet_msi_mask, .irq_ack = irq_chip_ack_parent, .irq_set_affinity = msi_domain_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_write_msi_msg = hpet_msi_write_msg, .flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_AFFINITY_PRE_STARTUP, };drivers/iommu/amd/init.c +0
-1@@ -2477,7 +2477,6 @@ static struct irq_chip intcapxt_controller = { .irq_unmask = intcapxt_unmask_irq, .irq_mask = intcapxt_mask_irq, .irq_ack = irq_chip_ack_parent, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_set_affinity = intcapxt_set_affinity, .irq_set_wake = intcapxt_set_wake, .flags = IRQCHIP_MASK_ON_SUSPEND |
IRQCHIP_MOVE_DEFERRED,drivers/pci/controller/pci-hyperv.c +0
-0@@ -2119,7 +2119,6 @@ static bool hv_pcie_init_dev_msi_info(struct device *dev,struct
irq_domain*domdrivers/pci/controller/pci-hyperv.c +0
-2info->ops->msi_prepare = hv_msi_prepare; chip->irq_set_affinity = irq_chip_set_affinity_parent; - chip->irq_retrigger = irq_chip_retrigger_hierarchy;if (IS_ENABLED (CONFIG_X86 )) chip->flags |=IRQCHIP_MOVE_DEFERRED ; --2.43.0
Re: [PATCH v5 4/4] x86/irq, iommu/amd, x86/hyperv, PCI: Drop redundant irq_retrigger inits
Quoted 8 lines · Michael Kelley
From: Naman Jain <[email protected]> Sent: Monday, September 14, 2026 4:19 AM
Quoted 3 lines
With
fixup_irqs(),msi_set_affinity()and the generic resend path (try_retrigger()) now all falling back toirq_chip_retrigger_hierarchy(),The "falling back" terminology is not accurate in this version of the patch set. Perhaps "all now calling
irq_chip_retrigger_hierarchy()directly"?
Thanks for catching this Michael, it was a miss on my part.
Regards,
Naman
Quoted 120 lines
Quoted 119 lines
installing it as the
irq_retrigger()callback on the outermost domain chips is no longer required. The hierarchy walk reaches the x86 vector domain'sapic_retrigger_irq()for all of these stacked domain chips.Remove the now redundant
irq_retrigger()initializations from the outermost domain interrupt chips, including the Hyper-V root partition PCI/MSI chip.No functional change intended.
Suggested-by Thomas Gleixner <[email protected]>Reviewed-by Shradha Gupta <[email protected]>Reviewed-by Thomas Gleixner <[email protected]>Signed-off-by Naman Jain <[email protected]>--- arch/x86/hyperv/irqdomain.c | 1 - arch/x86/kernel/apic/io_apic.c | 2 -- arch/x86/kernel/apic/msi.c | 2 -- arch/x86/kernel/hpet.c | 1 - drivers/iommu/amd/init.c | 1 - drivers/pci/controller/pci-hyperv.c | 1 - 6 files changed, 8 deletions(-)arch/x86/hyperv/irqdomain.c +0
-1@@ -316,7 +316,6 @@ static bool hv_init_dev_msi_info(struct device *dev, structirq_domain *domain, return false; chip->flags |=IRQCHIP_SKIP_SET_WAKE |IRQCHIP_MOVE_DEFERRED ; - chip->irq_retrigger = irq_chip_retrigger_hierarchy; info->ops->msi_prepare = pci_msi_prepare;arch/x86/kernel/apic/io_apic.c +0
-1@@ -1857,7 +1857,6 @@ static struct irq_chip ioapic_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ack_level, .irq_set_affinity = ioapic_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_get_irqchip_state = ioapic_irq_get_chip_state, .flags = IRQCHIP_SKIP_SET_WAKE |
IRQCHIP_MOVE_DEFERRED|
IRQCHIP_AFFINITY_PRE_STARTUP,arch/x86/kernel/apic/io_apic.c +0
-1@@ -1871,7 +1870,6 @@ static struct irq_chip ioapic_ir_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ir_ack_level, .irq_set_affinity = ioapic_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_get_irqchip_state = ioapic_irq_get_chip_state, .flags =IRQCHIP_SKIP_SET_WAKE | IRQCHIP_AFFINITY_PRE_STARTUP,arch/x86/kernel/apic/msi.c +0
-2@@ -246,7 +246,6 @@ static bool x86_init_dev_msi_info(struct device *dev, struct irq_domain *domain, info->ops->msi_prepare = x86_msi_prepare; info->chip->irq_ack = irq_chip_ack_parent; - info->chip->irq_retrigger = irq_chip_retrigger_hierarchy; info->chip->flags |=IRQCHIP_SKIP_SET_WAKE |IRQCHIP_AFFINITY_PRE_STARTUP ;@@ -313,7 +312,6 @@ static struct irq_chip dmar_msi_controller = { .irq_mask = dmar_msi_mask, .irq_ack = irq_chip_ack_parent, .irq_set_affinity = msi_domain_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_compose_msi_msg = dmar_msi_compose_msg, .irq_write_msi_msg = dmar_msi_write_msg, .flags = IRQCHIP_SKIP_SET_WAKE |
IRQCHIP_MOVE_DEFERRED|arch/x86/kernel/hpet.c +0
-1@@ -509,7 +509,6 @@ static struct irq_chip hpet_msi_controller __ro_after_init = { .irq_mask = hpet_msi_mask, .irq_ack = irq_chip_ack_parent, .irq_set_affinity = msi_domain_set_affinity, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_write_msi_msg = hpet_msi_write_msg, .flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_AFFINITY_PRE_STARTUP, };drivers/iommu/amd/init.c +0
-1@@ -2477,7 +2477,6 @@ static struct irq_chip intcapxt_controller = { .irq_unmask = intcapxt_unmask_irq, .irq_mask = intcapxt_mask_irq, .irq_ack = irq_chip_ack_parent, - .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_set_affinity = intcapxt_set_affinity, .irq_set_wake = intcapxt_set_wake, .flags = IRQCHIP_MASK_ON_SUSPEND |
IRQCHIP_MOVE_DEFERRED,drivers/pci/controller/pci-hyperv.c +0
-0@@ -2119,7 +2119,6 @@ static bool hv_pcie_init_dev_msi_info(struct device *dev,struct
irq_domain*dom
info->ops->msi_prepare=hv_msi_prepare;chip->irq_set_affinity = irq_chip_set_affinity_parent;drivers/pci/controller/pci-hyperv.c +0
-2- chip->irq_retrigger = irq_chip_retrigger_hierarchy;if (IS_ENABLED (CONFIG_X86 )) chip->flags |=IRQCHIP_MOVE_DEFERRED ; --2.43.0