public inbox for gwml@vger.gnuweeb.org
 help / color / mirror / Atom feed
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, 09 Aug 2025 17:32:16 +0200	[thread overview]
Message-ID: <87wm7ch5of.fsf@yellow.woof> (raw)
In-Reply-To: <aJdmGwFU6b9zh1BO@linux.gnuweeb.org>

Ammar Faizi <ammarfaizi2@gnuweeb.org> writes:
> Here's the result after reverting those two commits and applied the diff.
>
>   https://gist.github.com/ammarfaizi2/03c7a9c0fec2a11f206931f1b7790709#file-dmesg_pci_debug_002-txt
>
> Let's see if this one is enough for you to diagnose the problem.

Thanks, I think the problem is clear now. 

The diff I sent you has a mistake, it should be
    if (pci_msix_vec_count(pci_dev) < 0)
not
    if (!pci_msix_vec_count(pci_dev))

So the log is wrong, it printed "MSI-X, looking good...". It should have
printed the other one.

But no need to re-run it, the backtrace is enough.

    MSI-X, looking good... <-------- wrong log
    CPU: 3 UID: 0 PID: 183 Comm: systemd-udevd Not tainted 6.16.0-afh2-dbg-2025-08-09-gb622ab28bcac #13 PREEMPT(full)  28137b57996795286f6544f071ec852674a057d4
    Hardware name: HP HP Laptop 14s-dq2xxx/87FD, BIOS F.21 03/21/2022
    Call Trace:
     <TASK>
    dump_stack_lvl
    vmd_msi_init
    msi_domain_alloc
    irq_domain_alloc_irqs_locked
    __irq_domain_alloc_irqs
    __msi_domain_alloc_irqs
    msi_domain_alloc_irqs_all_locked
    __msi_capability_init
    __pci_enable_msi_range
    pci_alloc_irq_vectors_affinity
    pcie_portdrv_probe

So unlike what VMD doc says, it actually can have non-MSI-X children devices!

Please discard the reverts and the diff I sent you, and try the diff
below. I believe your machine will work now.

diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index b679c7f28f51..1bd5bf4a6097 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -306,9 +306,6 @@ static bool vmd_init_dev_msi_info(struct device *dev, struct irq_domain *domain,
 				  struct irq_domain *real_parent,
 				  struct msi_domain_info *info)
 {
-	if (WARN_ON_ONCE(info->bus_token != DOMAIN_BUS_PCI_DEVICE_MSIX))
-		return false;
-
 	if (!msi_lib_init_dev_msi_info(dev, domain, real_parent, info))
 		return false;
 

  reply	other threads:[~2025-08-09 15:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250801142254.GA3496192@bhelgaas>
     [not found] ` <175408424863.4088284.13236765550439476565.pr-tracker-bot@kernel.org>
2025-08-07  3:34   ` [GIT PULL v2] PCI changes for v6.17 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
2025-08-09 15:15                           ` Ammar Faizi
2025-08-09 15:32                             ` Nam Cao [this message]
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=87wm7ch5of.fsf@yellow.woof \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox