Re: [PATCH 2/2] PCI: Disable PCIE hotplug interrupts early when msi is disabled

From: Lukas Wunner
Date: Tue Feb 04 2025 - 04:23:56 EST


On Tue, Feb 04, 2025 at 01:37:58PM +0800, Feng Tang wrote:
> There was a irq storm bug when testing "pci=nomsi" case, and the root
> cause is: 'nomsi' will disable MSI and let devices and root ports use
> legacy INTX inerrupt, and likely make several devices/ports share one
> interrupt. In the failure case, BIOS doesn't disable the PCIE hotplug
> interrupts, and actually asserts the command-complete interrupt.
> As MSI is disabled, ACPI initialization code will not enumerate root
> port's PCIE hotplug capability, and pciehp service driver wont' be
> enabled for the root port to handle that interrupt, later on when it is
> shared and enabled by other device driver like NVME or NIC, the "nobody
> care irq storm" happens.

Is there a section in the PCI Firmware Spec which says ACPI doesn't
enumerate the hotplug capability if MSI is disabled?

If so, it should be referenced in the commit message.

If not, I'm wondering if it's safe to fiddle with the Slot Control
register given the platform hasn't granted OSPM control of it.

Of course if this is spec-defined behavior in the nomsi case,
we could make the write to the Slot Control register conditional
on that. But if this turns out to be platform-specific behavior,
we can't deal with it in generic PCI code but only in a quirk.

Thanks,

Lukas