From nobody Sun Aug 16 20:47:51 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hNShm4TdSz6pZqd for ; Sun, 16 Aug 2026 20:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hNShm1BDSz428X for ; Sun, 16 Aug 2026 20:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786913272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=68tjKNSYg9Vw1J/2Q0FV/umYk+tqj6bJTOI8QAzR2eg=; b=aN3Q0NhDiz0GV575U5kBRflFKTkDq5iK3kNU/Bi9NeAMtq0s4Opz2TNl2XFCDJZ1uSPTUL Tdzp288I3M4Srw32625B+gin9c9j6OVrDvFQZCYUYQEf/AFNEyZ+77pAGGcLUFae2HFdp5 GMzjkRYm5P52mcfv6h4l4ruElehdjyLma7X1I6C1fKR0lHfoDKvNgDx/3hmUFdt0hi4REA azgtO9IAs9a4hXPMa/YMxCALPBZUVU8+LiAoo5X+Tq/iWGtwdgg5Wh1d4CVDezakegbH46 GsptFsOurN3zuW1Sue8BBMLhXrEiVEPbbwkLlnt2DoVnD9lxC/KoFGw0l6QLsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786913272; a=rsa-sha256; cv=none; b=Mq/P2wan1Qrn/8yWP6iKIALavkHRWra5IvhPU3O9I9UTM9RuuiJFzn6Qs201nNf+zK6NbV pJ37yGbx0cljrKBl36JM/qpbUi3L7dlKR0r6vvBD6B3l7fqAPk+Or/exacsY3owWS/Gav6 Xf4cQ/z5eWqoiNbPrXsycij9PcwHvWn9rpQ2RlyjRUSXLAb0+HzggKfuMBLK8hpY8DL5Fv oivIiYCKxNMOFcJdp8HI7gtQwLg3JCUqgD0fQOfhOtpeo280nig1BcAUUSTuNHwzSPnFP+ a3LA0qn6yM9/iOTwa/+m9Ax0LlG89X2HWt5gEwkRUWsRGbg0nTJvOv5woTY4GA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786913272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=68tjKNSYg9Vw1J/2Q0FV/umYk+tqj6bJTOI8QAzR2eg=; b=dbzp4DjTwY9fybNZamHIrdfrFLR803OwQlVbu4c9e0G7bxb7di5j/XVHF+P4hDsaPbT00t MgtpuG66RDBnVoWloW1yu2L3uqqlDYF22mhnyNwKdIHXPQUHdy/KPJndc0Tb44r7W8KPUh Ez/Wl5Jr3/lYzmqiVaIDZJaTkOO5/2Elu2W8nEf4fYdv87QqC/Fj+RweMf5LETQo9OKTCZ XBsDBO8Dx3HFlPwQZhZlm7iHJk/jwAueTZOMPVHPDWgJqVoUArdbsOkto1nv2MHSMvKduG HnrLh6tG9TnEMqhYemHec+voEC+Esu1pqTJdQYhm0q9flPoXFqNMYlTwbDOpiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hNShl6qqrzkwD for ; Sun, 16 Aug 2026 20:47:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46bc5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 16 Aug 2026 20:47:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: cafdeed9d5d8 - stable/15 - pci: Ignore SR-IOV VFs when tuning MPS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cafdeed9d5d8fc3ac2a9172dc904f3c98df29280 Auto-Submitted: auto-generated Date: Sun, 16 Aug 2026 20:47:51 +0000 Message-Id: <6a8221f7.46bc5.72d20465@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=cafdeed9d5d8fc3ac2a9172dc904f3c98df29280 commit cafdeed9d5d8fc3ac2a9172dc904f3c98df29280 Author: Kevin Bowling AuthorDate: 2026-08-06 06:39:20 +0000 Commit: Kevin Bowling CommitDate: 2026-08-16 20:46:10 +0000 pci: Ignore SR-IOV VFs when tuning MPS The VF Device Control MPS and MRRS fields are reserved and preserved. VF transactions use the PF MPS, so a hardwired VF value must not be used to retune the shared PCIe hierarchy. Document the previously undocumented tuning knob and clarify why a VF may continue to display its reserved hardwired value. This fixes an instant crash/reboot on my Zen3 system with 82599 VFs. (cherry picked from commit 5aab6164161db397d84e5fff88e1af1a9e405875) --- share/man/man4/pci.4 | 13 ++++++++++++- sys/dev/pci/pci.c | 7 +++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/share/man/man4/pci.4 b/share/man/man4/pci.4 index 38a427e64f4f..71ca2f50ed90 100644 --- a/share/man/man4/pci.4 +++ b/share/man/man4/pci.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 10, 2026 +.Dd August 6, 2026 .Dt PCI 4 .Os .Sh NAME @@ -589,6 +589,17 @@ MSI interrupts can be disabled by setting this tunable to 0. Enable support for extended Message Signalled Interrupts .Pq MSI-X . MSI-X interrupts can be disabled by setting this tunable to 0. +.It Va hw.pci.enable_mps_tune Pq Defaults to 1 +Configure PCI-express Maximum Payload Size +.Pq MPS +during device enumeration. +SR-IOV Virtual Functions are excluded because their MPS fields are reserved +and the Physical Function setting applies to them. +Configuration-space tools may therefore display a Virtual Function's +hardwired reserved value rather than the effective Physical Function MPS. +Maximum Read Request Size +.Pq MRRS +is not modified by this tuner. .It Va hw.pci.enable_pcie_ei Pq Defaults to 0 Enable support for PCI-express Electromechanical Interlock. .It Va hw.pci.enable_pcie_hp Pq Defaults to 1 diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 2a43fa10b7e0..5adae09cf737 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -4421,6 +4421,13 @@ pcie_setup_mps(device_t dev) device_t root; uint16_t rmps, mmps, mps; + /* + * PCIe r4.0, sec 9.3.5.4 defines the VF MPS and MRRS fields as + * Reserved and Preserved, with the PF settings applying to the VF. + * Do not use the VF's hardwired value to configure the shared path. + */ + if ((dinfo->cfg.flags & PCICFG_VF) != 0) + return; if (dinfo->cfg.pcie.pcie_location == 0) return; root = pci_find_pcie_root_port(dev);