Re: [PATCH v1 0/2] PCI: Add pci=nobwctrl to disable the PCIe bandwidth controller

Guixin Liu <[email protected]>
Newsgroups org.kernel.vger.linux-pci
Message-ID <[email protected]>

在 2026/7/29 15:01, Lukas Wunner 写道:
> On Wed, Jul 29, 2026 at 11:45:03AM +0800, Guixin Liu wrote:
>> Enabling the PCIe bandwidth controller sets the Link Bandwidth Management
>> Interrupt Enable (LBMIE) and Link Autonomous Bandwidth Interrupt Enable
>> (LABIE) bits.  On some (typically old) platforms this has been observed to
>> cause boot hangs; commit 46a9f70e93ef ("PCI/bwctrl: Disable BW controller
>> on Intel P45 using a quirk") works around one such platform with a
>> per-device quirk.
>>
>> A per-device quirk only helps once the offending device is identified and
>> a quirk has shipped, which is awkward for a boot hang since the machine
>> cannot be booted to report the culprit.  The only existing escape hatch,
>> pcie_ports=compat, is a blunt instrument that also disables AER, PME,
>> hotplug and DPC.
> Ideally we want to identify all devices that have problems if the
> bandwidth controller is enabled and add quirks for every one of them.
>
> In a sense, a command line option disincentivizes reporting and
> fixing affected devices because users can just work around the problem.
>
> Additionally, there is a general dislike in the community for
> adding new command line options.
>
> Are you seeing issues on different devices than the one that's
> already been quirked?  If so, a patch to add quirks for them
> would be welcome.
>
> Thanks,
>
> Lukas
Thanks Lukas, that's fair - I fully agree that per-device quirks are
the right long-term fix, and I'll gladly send quirks for any device I
can reproduce this on.

I'd argue this option isn't really an alternative to quirks, though.
It's what lets you *get to* a quirk in the first place, and it closes
a gap that is specific to bwctrl:

- To write a bwctrl quirk you first have to prove bwctrl is the
   culprit. pcie_ports=compat can get a hung machine booted, but it
   tears down *all* port services at once, so it can't tell you whether
   the offender was bwctrl, AER, PME or hotplug. pci=nobwctrl isolates
   exactly one variable, which is precisely the information a quirk
   needs. In that sense it feeds the quirk pipeline rather than
   discouraging reports.

- compat is also too blunt as a workaround on modern systems: losing
   native AER/DPC/hotplug just to silence bwctrl is a large regression
   in error handling. A surgical switch keeps everything else native.

- bwctrl is currently the only PCIe port service with neither a
   native/_OSC gate nor a disable of its own. hotplug, AER and PME are
   all gated on pcie_ports_native || host->native_*, and pci=noaer
   already exists as precedent. This mostly brings bwctrl up to parity
   rather than inventing a new class of knob.

If the command-line parameter itself is the sticking point, I'm happy
to implement this in whatever form you prefer - e.g. gating bwctrl
registration the same way the other services are gated, or a per-port
sysfs runtime control. My goal is to close the gap; the mechanism is
negotiable.

Best Regards,
Guixin Liu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.