From nobody Thu Oct 08 20:44:17 2026 X-Original-To: dev-commits-src-branches@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 4j126D0LDDz4n2tS for ; Thu, 08 Oct 2026 20:44:20 +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 4j126C5W6kz4cKt for ; Thu, 08 Oct 2026 20:44:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791492259; 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=uRlJsuI5Q5bJPZR2Nyt/gdLs1xcZ2KKMMFUQDA0uI9k=; b=Jm4mODHHTFKzLPjq1n0zKTfi17M/dPHShaihPpnFYrWWob+R6CKOQLjPAZgW5bDdFp9bzz eKKRMWkCLWBcJtYe95Mmas48Nfr72b8c46NY9ZNwSXlHj6N7oW7c4obugSkMkg+aDJic87 ISYEZou99n72pmp1InnWK8Yr4RmM2/twzS7nvZA5Z1aYqWHdsnpjbMfBTK0lu1fTgMQHh2 oFH/cfTmXLTtqZOhYXZEwGO11xcPDm1N33SNBZyrIHZqdNsGZEGnmrKMKylwwMVyW51op4 9Y0EOgIQTVdga7RW8DagtuqmRcqTde36cmS0DCzAB5or+IiMkeqf23g3QzvhjA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1791492259; b=f59B4mH4xBdb9coo2vlcf0Zhl2fTmDUvE7TdHRJv3WEU7A5717R6AO56UFaM9cYP9iZ5qe O8TYGBOnxKJQ0p0kyxsC32pfHZui5Njty7Y4NmRktdpaX0P8Gpcd1d0geNgzx783J2QEco zl4RKehbDMSeupUg7yPk82JCcD/A4gqTE1ACzzQONi6SpQOc1/bCBFdb/txkpKdiPTbhSl JifCcxlo4q/m0PhhjD/FSVAIcLxZXTieizR1FJrjHawh1+cPmZqLUMuGxqaACgKssyoAPR wluq/jaH9SUwvQfq0k9JZtllMUqRSqdPJO0cAYNqSJ4GxIZFmlkquD0N5jN4iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791492259; 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=uRlJsuI5Q5bJPZR2Nyt/gdLs1xcZ2KKMMFUQDA0uI9k=; b=ZiphR2DMIZHnaBTO4Nxy5/FO08gohBHnk2PNkxaIGu5X2BhxMpyR8zBRHCBVFtTx6qJjrc jtYTij6wgf0sf9iPdR3bQ9jak/z3e3+9PgCPDAgWHylpOpCx/2w3suMk3rbrxRC/CPDabN 8uGK4tk9DTu5VrUx5afWqOAEjd8ExFMU4E3Zss10YazNM3jeyd9F/mXelaTDziod7zQAHH 0uxRd0dtNw3NsPaB4f3WSCXiBWp1s5HTSvPfXyj/UqNBSFkj/ZD9Wrthn5ycljVmVSbJdK keWoMxNyaPz3tkVQhDozazZDiF+u8Rh4WuC4nwzPHyEpbjs1IbsVGEjuNqPhpw== 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 4j12695004zwF7 for ; Thu, 08 Oct 2026 20:44:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32455 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Oct 2026 20:44:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Osvaldo Janeri Filho From: John Baldwin Subject: git: dbdc129981c3 - stable/15 - pcib: Only apply ARI translation to a bridge's own secondary bus List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: dbdc129981c35b771f538e9f6c6a72b32b7858a0 Auto-Submitted: auto-generated Date: Thu, 08 Oct 2026 20:44:17 +0000 Message-Id: <6ac800a1.32455.3c4dddac@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dbdc129981c35b771f538e9f6c6a72b32b7858a0 commit dbdc129981c35b771f538e9f6c6a72b32b7858a0 Author: Osvaldo Janeri Filho AuthorDate: 2026-09-30 15:04:08 +0000 Commit: John Baldwin CommitDate: 2026-10-08 20:42:33 +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 (cherry picked from commit 10409ee40baf593b810cd0140f3c2f0d737c1a65) --- 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 3b4b15b25fa7..475202873ff7 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);