From: Nam Cao <namcao@linutronix.de>
To: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Lukas Wunner <lukas@wunner.de>,
Bjorn Helgaas <helgaas@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux PCI Mailing List <linux-pci@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Rob Herring <robh@kernel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Manivannan Sadhasivam <mani@kernel.org>,
Krzysztof Wilczynski <kwilczynski@kernel.org>,
Armando Budianto <sprite@gnuweeb.org>,
Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>,
gwml@vger.gnuweeb.org, namcaov@gmail.com
Subject: Re: [GIT PULL v2] PCI changes for v6.17
Date: Sat, 9 Aug 2025 16:49:27 +0200 [thread overview]
Message-ID: <20250809144927.eUbR3MXg@linutronix.de> (raw)
In-Reply-To: <aJdNB8zITrkZ3n6r@linux.gnuweeb.org>
On Sat, Aug 09, 2025 at 08:28:39PM +0700, Ammar Faizi wrote:
> On Sat, Aug 09, 2025 at 06:34:29AM +0200, Nam Cao wrote:
> > On Sat, Aug 09, 2025 at 07:52:30AM +0900, Ammar Faizi wrote:
> > > I can do that. Send me a git diff. I'll test it and back with the dmesg
> > > output.
> >
> > That would be very helpful, thanks!
> >
> > Please bear with me, this may take a few iterations.
> >
> > Let's first try the below.
>
> I just got home from a family outing. A bit slow response.
>
> Here's the result:
>
> https://gist.github.com/ammarfaizi2/ef5f98123ed3868f8d64ed41662edd63#file-dmesg_pci_debug_001-txt-L853
Thanks! Here's the problem:
[ 1.037223] pcieport 10000:e0:1d.0: __pci_enable_msix_range:840 err=hwsize
The PCIe port driver enables interrupt, trying MSI-X first. However, the
device does not support MSI-X, so it tries MSI instead, which triggers
the WARN_ON() in VMD driver.
What's strange is that, the VMD doc says:
"Intel VMD only supports MSIx Interrupts from child devices and
therefore the BIOS must enable PCIe Hot Plug and MSIx interrups"
Is it lying to us?
Can you please try:
Revert d5c647b08ee0 ("PCI: vmd: Fix wrong kfree() in vmd_msi_free()")
Revert d7d8ab87e3e7 ("PCI: vmd: Switch to msi_create_parent_irq_domain()")
So that the driver is back to the original state before I touched it.
And apply the diff below. This will tell us if my commit breaks the driver
somehow, or VMD has been allowing MSI all this time.
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index d9b893bf4e45..e99d8cefb78d 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -255,9 +255,15 @@ static int vmd_msi_init(struct irq_domain *domain, struct msi_domain_info *info,
msi_alloc_info_t *arg)
{
struct msi_desc *desc = arg->desc;
+ struct pci_dev *pci_dev = msi_desc_to_pci_dev(desc);
struct vmd_dev *vmd = vmd_from_bus(msi_desc_to_pci_dev(desc)->bus);
struct vmd_irq *vmdirq = kzalloc(sizeof(*vmdirq), GFP_KERNEL);
+ if (!pci_msix_vec_count(pci_dev))
+ pr_err("But VMD only supports MSIx Interrupts from child devices!\n");
+ else
+ pr_err("MSI-X, looking good...\n");
+ dump_stack();
if (!vmdirq)
return -ENOMEM;
next prev parent reply other threads:[~2025-08-09 14:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-01 14:22 [GIT PULL v2] PCI changes for v6.17 Bjorn Helgaas
2025-08-01 21:37 ` pr-tracker-bot
2025-08-07 3:34 ` Ammar Faizi
2025-08-07 3:51 ` Lukas Wunner
2025-08-07 4:44 ` Nam Cao
2025-08-07 4:54 ` Ammar Faizi
2025-08-07 5:03 ` Nam Cao
2025-08-07 5:13 ` Ammar Faizi
2025-08-08 10:59 ` Ammar Faizi
2025-08-08 11:19 ` Ammar Faizi
2025-08-08 13:34 ` Ammar Faizi
2025-08-08 18:07 ` Nam Cao
2025-08-08 22:52 ` Ammar Faizi
2025-08-09 4:34 ` Nam Cao
2025-08-09 13:28 ` Ammar Faizi
2025-08-09 14:49 ` Nam Cao [this message]
2025-08-09 15:15 ` Ammar Faizi
2025-08-09 15:32 ` Nam Cao
2025-08-09 16:03 ` Ammar Faizi
2025-08-09 16:28 ` Nam Cao
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=20250809144927.eUbR3MXg@linutronix.de \
--to=namcao@linutronix.de \
--cc=alviro.iskandar@gnuweeb.org \
--cc=ammarfaizi2@gnuweeb.org \
--cc=gwml@vger.gnuweeb.org \
--cc=helgaas@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=lukas@wunner.de \
--cc=mani@kernel.org \
--cc=namcaov@gmail.com \
--cc=robh@kernel.org \
--cc=sprite@gnuweeb.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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.