From nobody Wed Sep 30 15:04:42 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 4hvyy31D8cz6tf4G for ; Wed, 30 Sep 2026 15:04:43 +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 4hvyy30VTpz4L1N for ; Wed, 30 Sep 2026 15:04:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790780683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kJuw1vUBJ44yil7z1jw7hmE2vHVrgYHA9Nzz7f4ktXE=; b=UQOlLFc8ZhI9Tk8ppU+8px+AXbenkHXxd11rt5VKf3niqLl/XbcAJZ0FKp/QSXhG29Bc93 m9gNcog7GuvlTVoTzCWDdNFmGXzn8am8Sf+R/mbXeGwv+A28DHzq0Nx90ILJrBuCaPROQG preCwoM6+0yzU5L5HkxYEZTSk0gWEi9kbmGkYnwbzDBQB3iXw5EpRSAeazTLPGTLrzM8EL G/r3flsMD2YbvCwPixG4t1aFWIqotkpBchjiRJNjdqXcrNQpUZ4t94mRk3xhuJ7oD2H01L MAk7mlp/e+3vmoRYEcDlxqBYCmJ9W7zdIVq9SkhiUFRius6V+0C6XgMOX+Ws/Q== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790780683; b=g0iebe0BnA/UhtRqHA7wNrnbfe9oCyNdOZs3XrKOmiAV+BCkJFp67wuJ+bmM27rIhGA7Xi t51nn3NhPxMEjQkacxUQxKnrGrcs2I3fNEHnwSgcJvm/zeirVjtyVMk0vl3qegPjaddwgD Yet347K9eB//A7/Vop6IaKNsjXCmf3U2120asghbvOl7qx4tSENKfQUXzSeUVERzMw1aMD 9UM2Jwwp3qCG+49GC/MVl+eik9kXtMcEikDX4IxuNJDBdBSJFJ13efDhV6q6R3zwnq/X6s Jj5xlZn1WeTOPPHvv+v+2uZa0xSQMsjjvgHeZiBYTAbpLFbknkErg/hOJOsfaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790780683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kJuw1vUBJ44yil7z1jw7hmE2vHVrgYHA9Nzz7f4ktXE=; b=mL7vqkZuKuVznoKf8GxP17toFVNAErmC3NW3pbQnAwyHww0yHlBndK9VK6L3wtPMW7UJVV DhymVDO0H/chcVFVUUjd77xa+Si2IPz1zq2Pz8wTlH9jCF5ooxi/Dz8f1iV9IdhDKtJkvp IadN56w0khVyqHS6f1ski9fQFf7r1u6LCiJ/SZXlYUeqSbxyLKVstuOxxvg3FTquL77Sts 77iP0pzZkBe4ODb7fxAqkIsYU+UG7VIjGkYNxxb5wmXWLXJ8APdKRHuFR8Du9bR6J1K8Ba Vxt161dm7LIwr/nSHNllNEkJ7NfKV7RiLaEUT/O7k8s/NscuDYXZD0rcrylLNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hvyy26N09zr7t for ; Wed, 30 Sep 2026 15:04:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 263be by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 30 Sep 2026 15:04:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Osvaldo Janeri Filho From: John Baldwin Subject: git: 10409ee40baf - main - pcib: Only apply ARI translation to a bridge's own secondary bus 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10409ee40baf593b810cd0140f3c2f0d737c1a65 Auto-Submitted: auto-generated Date: Wed, 30 Sep 2026 15:04:42 +0000 Message-Id: <6abd250a.263be.11bdc9ce@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=10409ee40baf593b810cd0140f3c2f0d737c1a65 commit 10409ee40baf593b810cd0140f3c2f0d737c1a65 Author: Osvaldo Janeri Filho AuthorDate: 2026-09-30 15:04:08 +0000 Commit: John Baldwin CommitDate: 2026-09-30 15:04:08 +0000 pcib: Only apply ARI translation to a bridge's own secondary bus ARI changes RID interpretation only for the device on a downstream port's secondary bus. pcib_xlate_ari() applied that translation to every config access through an ARI-enabled bridge, including cycles forwarded to a subordinate bus. A non-zero slot on a subordinate bus then panics an INVARIANTS kernel and is misrouted otherwise. Translate only when the access targets this bridge's secondary bus. Reviewed by: kib, jhb Fixes: 55d3ea1731d1 ("Add support for PCIe ARI") Sponsored by: AMD Differential Revision: https://reviews.freebsd.org/D60033 --- sys/dev/pci/pci_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 5cdb1de71c3f..aa04bfa054c1 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -2346,7 +2346,8 @@ pcib_xlate_ari(device_t pcib, int bus, int *slot, int *func) sc = device_get_softc(pcib); ari_func = *func; - if (sc->flags & PCIB_ENABLE_ARI) { + /* ARI applies only to this port's secondary bus. */ + if ((sc->flags & PCIB_ENABLE_ARI) && bus == sc->bus.sec) { KASSERT(*slot == 0, ("Non-zero slot number with ARI enabled!")); *slot = PCIE_ARI_SLOT(ari_func);