Re: [PATCH v2] pci: Prefer MMCONFIG for all config space accesses if available

From: Lukas Wunner

Date: Wed Dec 02 2026 - 06:08:14 EST


On Tue, Dec 01, 2026 at 10:49:10PM -0800, Josh Triplett wrote:
> On Wed, Dec 02, 2026 at 01:07:58AM +0000, Matthew Wilcox wrote:
> > On Mon, Nov 30, 2026 at 09:35:51PM -0800, Josh Triplett wrote:
> > > Even when MMCONFIG is available, PCIe currently defaults to IO-based
> > > accesses for the first 256 bytes of config space.
> >
> > Yes; did we fail to document why? It's been 20 years since I looked at
> > it, but there was always funkiness on Intel systems when the MMCONFIG
> > regin aliased the builtin GFX BAR, which happens during BAR sizing.
> > I recall we tried a lot of different things, and just gave up on
> > MMCONFIG for the low 256 bytes.
>
> On which systems, specifically? We have systems with a lot more devices
> than we did 20 years ago, and accessing them via IO and a lock is a
> bottleneck. I'd be happy to either extend the denylist (if you can
> characterize the systems where it was a problem) or if we *have* to, we
> can make it a broad allowlist.

pci_bridge_d3_possible() (in drivers/pci/pci.c) checks for
"dmi_get_bios_year() >= 2015" when deciding whether to allow
D3hot on PCIe ports. I suggest using a similar cut-off for
an enabled-by-default MMCONFIG.

Thanks,

Lukas