From: Gautam Menghani <gautam@linux.ibm.com>
To: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Cc: maddy@linux.ibm.com, linuxppc-dev@lists.ozlabs.org,
tpearson@raptorengineering.com, mpe@ellerman.id.au,
npiggin@gmail.com, chleroy@kernel.org, namcao@linutronix.de,
tglx@kernel.org, yury.norov@gmail.com, tiwai@suse.de,
wangruikang@iscas.ac.cn, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc: pci-ioda: Fix the stale irq chip reference
Date: Tue, 25 Aug 2026 00:19:13 +0530 [thread overview]
Message-ID: <aoySKRSGKMXho8Ij@Gautams-MacBook-Pro.local> (raw)
In-Reply-To: <178716225364.1437.6201568081502251835.stgit@linux.ibm.com>
On Wed, Aug 19, 2026 at 05:58:22PM +0000, Shivaprasad G Bhat wrote:
> The commit f0ac60e6e311 ("powerpc/powernv/pci: Switch to use
> msi_create_parent_irq_domain()") removed the legacy MSI irq chip
> pnv_pci_msi_irq_chip but left behind the static definition of it and
> its reference in is_pnv_opal_msi().
>
> The KVM IRQ bypass for vfio devices is broken because the
> comparision in is_pnv_opal_msi() fails on the comparision with
> stale unused variable showing the below errors in dmesg.
>
> kvmppc_set_passthru_irq_hv: Could not assign IRQ map for (X,Y)
> kvmppc_set_passthru_irq (irq X, gsi Y) fails: -2
> vfio-pci A:B:C.D irq bypass producer (eventfd Z) registration fails: -2
>
> The patch removes the stale variable definition and fixes the
> is_pnv_opal_msi() by comparing against the chip name prefix.
>
> Fixes: f0ac60e6e311 ("powerpc/powernv/pci: Switch to use msi_create_parent_irq_domain()")
> Cc: stable@kernel.org
> Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
> ---
> arch/powerpc/platforms/powernv/pci-ioda.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
> index 32ecbc46e74b..728a5610d167 100644
> --- a/arch/powerpc/platforms/powernv/pci-ioda.c
> +++ b/arch/powerpc/platforms/powernv/pci-ioda.c
> @@ -1623,15 +1623,13 @@ int64_t pnv_opal_pci_msi_eoi(struct irq_data *d)
> return opal_pci_msi_eoi(phb->opal_id, d->parent_data->hwirq);
> }
>
> -static struct irq_chip pnv_pci_msi_irq_chip;
> -
> /*
> * Returns true iff chip is something that we could call
> * pnv_opal_pci_msi_eoi for.
> */
> bool is_pnv_opal_msi(struct irq_chip *chip)
> {
> - return chip == &pnv_pci_msi_irq_chip;
> + return chip && chip->name && str_has_prefix(chip->name, "PNV-");
> }
> EXPORT_SYMBOL_GPL(is_pnv_opal_msi);
>
> @@ -1728,7 +1726,7 @@ static const struct msi_parent_ops pnv_msi_parent_ops = {
> .chip_flags = MSI_CHIP_FLAG_SET_EOI,
> .bus_select_token = DOMAIN_BUS_NEXUS,
> .bus_select_mask = MATCH_PCI_MSI,
> - .prefix = "PNV-",
> + .prefix = "PNV-", /* Note: is_pnv_opal_msi() uses this */
> .init_dev_msi_info = pnv_init_dev_msi_info,
> };
>
I boot tested this patch on KVM on PowerNV (P9) and KVM on LPAR (P10),
with the USB controller passed through to the guest.
The warnings are not observed.
Tested-by: Gautam Menghani <gautam@linux.ibm.com>
prev parent reply other threads:[~2026-08-24 18:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 17:58 [PATCH] powerpc: pci-ioda: Fix the stale irq chip reference Shivaprasad G Bhat
2026-08-24 18:49 ` Gautam Menghani [this message]
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=aoySKRSGKMXho8Ij@Gautams-MacBook-Pro.local \
--to=gautam@linux.ibm.com \
--cc=chleroy@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=namcao@linutronix.de \
--cc=npiggin@gmail.com \
--cc=sbhat@linux.ibm.com \
--cc=tglx@kernel.org \
--cc=tiwai@suse.de \
--cc=tpearson@raptorengineering.com \
--cc=wangruikang@iscas.ac.cn \
--cc=yury.norov@gmail.com \
/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.