All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Naman Jain" <namjain@linux.microsoft.com>
Cc: linux-pci@vger.kernel.org, linux-hyperv@vger.kernel.org
Subject: Re: [PATCH v6 4/4] x86/irq, iommu/amd, x86/hyperv, PCI: Drop redundant irq_retrigger inits
Date: Wed, 23 Sep 2026 04:43:53 +0000	[thread overview]
Message-ID: <20260923044354.277A31F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260923043023.3150498-5-namjain@linux.microsoft.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] irq: lost interrupts during CPU hotplug due to skipped top-level chip in fixup_irqs()
--

commit 7fb72a647b56b7209b19850bb988eed0fff8563c
Author: Naman Jain <namjain@linux.microsoft.com>

x86/irq, iommu/amd, x86/hyperv, PCI: Drop redundant irq_retrigger inits

This commit removes the redundant irq_retrigger() initializations from the
outermost domain interrupt chips. The commit message notes this is because
fixup_irqs() and msi_set_affinity() now use irq_chip_retrigger_hierarchy().

>     With fixup_irqs() and msi_set_affinity() now using
>     irq_chip_retrigger_hierarchy(), the outermost domain chips no longer need
>     the helper as their irq_retrigger() callback. The generic resend path
>     already uses the hierarchy helper.

[Severity: High]
Can the transition to using irq_chip_retrigger_hierarchy() directly in
fixup_irqs() result in a regression where hardware interrupts are lost
during CPU hotplug?

When a CPU is taken offline, fixup_irqs() is called to migrate and
retrigger pending interrupts. It retrieves the top-level irq_data and calls
irq_chip_retrigger_hierarchy():

arch/x86/kernel/irq.c:fixup_irqs() {
    ...
    data = irq_desc_get_irq_data(desc);
    ret = irq_chip_retrigger_hierarchy(data);
    ...
}

However, irq_chip_retrigger_hierarchy() is designed to be used as a chip
callback, so it unconditionally starts its search at data->parent_data,
skipping the top-level chip itself:

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)
    ...
}

If an interrupt is non-hierarchical (e.g., directly managed by
lapic_controller in the root x86_vector_domain), it has no parent
(parent_data == NULL).

Will the retrigger loop fail to execute, returning 0 without calling
apic_retrigger_irq(), and silently dropping the pending interrupt?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260923043023.3150498-1-namjain@linux.microsoft.com?part=4

  reply	other threads:[~2026-09-23  4:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23  4:30 [PATCH v6 0/4] x86/irq: Fix lost interrupts on CPU hot-unplug Naman Jain
2026-09-23  4:30 ` [PATCH v6 1/4] x86/hyperv: Set irq_retrigger for root partition PCI/MSI irqchip Naman Jain
2026-09-23  4:37   ` sashiko-bot
2026-09-23  4:30 ` [PATCH v6 2/4] x86/irq: Use irq_chip_retrigger_hierarchy() in fixup_irqs() Naman Jain
2026-09-23  4:41   ` sashiko-bot
2026-09-23  4:30 ` [PATCH v6 3/4] x86/irq: Use irq_chip_retrigger_hierarchy() in msi_set_affinity() Naman Jain
2026-09-23  4:42   ` sashiko-bot
2026-09-23 14:30   ` Michael Kelley
2026-09-23  4:30 ` [PATCH v6 4/4] x86/irq, iommu/amd, x86/hyperv, PCI: Drop redundant irq_retrigger inits Naman Jain
2026-09-23  4:43   ` sashiko-bot [this message]
2026-09-23 14:33   ` Michael Kelley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260923044354.277A31F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=namjain@linux.microsoft.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.