From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796489092; b=CbDV35bP/pZcVgAkL/AEp5wd4DVC04zyQP2MVaLGT2u/bAdeGh61qSMJ/DPv/2ii/Vye CEeWHQJNfzR5Jj61BiiSBep1CmzAM5Y70wOPK5hL3fLMdo9M2cjm0qe99pKhUWQDhhqqL z0Z1Dc8vUayxOLYmwRN2ebFtx9ALO4LyOqNU1pqgEYnJJzimn6yrAIALThQVe/DvN3Rx6 k00Yg6j8AvmZxxvZ3lzk6udSl/OVwvnpw4IAmz4ecFaIh6OXKYrellC1MA7H+RugggckP UPcM3FdXb7fKq94hDqRF91roBvqO28BqBvUpg2MBg5BE2l/ipIiWZb/owHOrsOLzJCw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796489092; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=U33UXjErd8Z7EGCYfW8nvEhjKFCSG/syrhhk8tOZLXs=; b=mu0KacNZsXRCqmE69g5N5tkl4XOR8pHenzmn4llsxu4xdtW8iF7ApmYSNAsNJjuA/Gz1 Q9ZLLGX21odnR81GRbCsRvHKJDFX9naUL3z9A5w8+UzA3jZJiuB7RRRdIkBY1twW1BwH/ 0yuNiADPbnybmfBkTvjzwSDZVFpDNUiHBOLQT6YzIZF6hFHfqjI3bkARWgeUgG9D1ya6l +JwszscxLJ93CJdee6lnX1is4UL9Jm991ZIyaiX7BN+P3LhcB2D/sAQZ0OYqsXTewKKkC T+zGcrj2JVxYBNGzXAQPuN4yCJ1GaTVxfc4matPY0aB1IF/6PZ5tzHD3hj7cc0JvDBw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="GyuF7HS/"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B583606A31F; Sat, 5 Dec 2026 16:44:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GyuF7HS/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96FBC1F00936; Sat, 5 Dec 2026 16:44:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796489091; bh=U33UXjErd8Z7EGCYfW8nvEhjKFCSG/syrhhk8tOZLXs=; h=Date:From:To:Cc:Subject:In-Reply-To; b=GyuF7HS/oE8eN1RtLrA8dHy9lZLNZ2qNqpr7dyXzCfmZ1Yd3fgmvrUJBlquNRSE2D TNgbKCwsbWDYGNaVw/gJ6q0fcsEbgej1hYFchGwXDcIM5GbU5c8z0gB2VIJTv5Ep3i lP9cDgjbWr15LxTOj/+HrCnUuFD/B43V2iqU+ykNoh7FL3JpgfcRNNTV1aAu9tIxEJ ZNEut1w5v3hup1cgRm8X8SjM+K0XgZLtt5yp6C7h0Bf0f/s0FNPsaCet/E7XalF7P+ i559rMpmRBA3bf5VhJrlubvpsVmP8bTHYQtMAzpIZII+Jntkhh0rktD/Vg4lbAtdB7 /Yjw46jlx1m2A== Date: Sat, 5 Dec 2026 10:44:50 -0600 From: Bjorn Helgaas To: Lukas Wunner Cc: Josh Triplett , Matthew Wilcox , Borislav Petkov , Bjorn Helgaas , Jonathan Corbet , Shuah Khan , Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , linux-pci@vger.kernel.org, x86@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] pci: Prefer MMCONFIG for all config space accesses if available Message-ID: <20261205164450.GA972498@bhelgaas> X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Dec 02, 2026 at 12:08:00PM +0100, Lukas Wunner wrote: > 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. Sounds good to me.