From nobody Thu Nov 19 20:33:10 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 4jVqsz0zZRz719lX for ; Thu, 19 Nov 2026 20:33:11 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jVqsz030Wz4rfr for ; Thu, 19 Nov 2026 20:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795120391; 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=F1pibcALWuf8o7Bnu9fRsw1KwdZyCZF3h0IxsM+ghok=; b=MGhiVTesd+TvpFRRAtIFnO5hPI4rbWfv/Bteop5oMs4bjulwQwuVUfwHq3ngBpFwh/CJ8c VdUl8O7FjLSEsZKBhy17U9IfcPMUPWv162ILdHpBBxdnZ3sjHkDR/IdZ/xDct5JWVbWzow ZLsaVgqpHIsK2FQ3uKW0mI40GrqbhBGA71vrGa5Bd3deHbGCQn440E0+c4iVMMlhyayFv4 e0Md5dr0SaF5AKB/CRQJL+kH5T5ypi4+gfHBW4xJd5hPEM2rLTtJ/Ih/LZWz/hbmERQrvi YwMWoklBVnKNT9wq/m1lfVIdoqg2YBVRSmG3+QxadRdAp+wB0vGtd09v2lb7KA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795120391; b=cO1JSsrfDB623hA7bVzyPhi5ZXc8pFa3vgxANzltyxYYdW4FizEIdLGxvCD3DM7HoSJVgK TtI5ChBc5V/RHNiNPa3mMeWeW0bLpwU6PrtdO6WkPEmiIzV7yTBydn7qPhUthQM/c8Qq9P Ma9fXOA1qqlfso95fevV85TFC0WNu92uBfWg9CSGoNWMSQZBoii8ldHlCahV49jyyeHpho TEO5sWp9v4lPoD7dhfHLs9RJ/h0+6nWUfuOys/EQ3GpVqHJ2srXz9V521zUn8rm4RsCxkR kejtrn52SH2X6hse4HV/vbNWI+7olZB6GmVy3zK09YpjGXtwe9+aAWIb2Y1lgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795120391; 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=F1pibcALWuf8o7Bnu9fRsw1KwdZyCZF3h0IxsM+ghok=; b=SUyNGVP2vRh8LXbIWABsB1iEf7WU5znZzUbrzpgjE5bDEg4Kwk5AjoBkwkkigTjR6R7VG4 qckEr23og68NcbOdzN4IbMSIfs+/JavI+rYizDhcj3TUyVObrMmKzmESOUcVNQYI7DvDot io7CrJ+a0dXZkGkPp3F391IhM7BuxYK9NNHBZG9IH+UGiKxmCWeL3n3OorpvhfUx3LHEjy Aur60wI4Q9NIR+GoA2hLsQH5QAlpEIl+xWJBEeJ14Z6s8p5gD8RVu1UYyI9HqfCPmPCE7C YIMYm+PWfZqFuxGH8/fy6i88XQAjAjVj3RSxLJ8uN4ycrgydtacIQ8dIRC12fg== 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 4jVqsy6qDRzGlM for ; Thu, 19 Nov 2026 20:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id bf83 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 19 Nov 2026 20:33:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Doongar Singh From: Jessica Clarke Subject: git: 69f76efd01a7 - stable/15 - bhyve/riscv: fix PCIe FDT interrupt-map entry stride List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository 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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 69f76efd01a72fe0d6cb68442d2c15d3174a268f Auto-Submitted: auto-generated Date: Thu, 19 Nov 2026 20:33:10 +0000 Message-Id: <6aff5d06.bf83.5e16597a@gitrepo.freebsd.org> The branch stable/15 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=69f76efd01a72fe0d6cb68442d2c15d3174a268f commit 69f76efd01a72fe0d6cb68442d2c15d3174a268f Author: Doongar Singh AuthorDate: 2026-11-13 12:35:14 +0000 Commit: Jessica Clarke CommitDate: 2026-11-19 20:32:53 +0000 bhyve/riscv: fix PCIe FDT interrupt-map entry stride In bhyve arm64, each PCIe interrupt-map entry spans 10 cells because the ARM GIC specifies #interrupt-cells = 3. On RISC-V, the APLIC uses #interrupt-cells = 2, so each entry spans only 9 cells. When the PCIe FDT code was originally adapted from arm64, the property allocation size and cell assignments were reduced to 9 cells per entry, but the loop multiplier retained the 10-cell stride. This caused the interrupt-map array to be packed incorrectly with gaps, breaking PCI interrupt routing in guest operating systems and overflowing the allocation by 16 cells. Correct the loop stride to 9 cells so the interrupt map is properly formed. Reviewed by: jrtc27 Fixes: 7ab1a32cd43c ("bhyve/riscv: Initial import") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D61473 (cherry picked from commit fabdac3abcbb06551415ca64b69b0e29946834f9) # 50 columns --| 72 columns --| # # Uncomment and complete these metadata fields, as appropriate: # # PR: # Reported by: # Reviewed by: # Tested by: # Approved by: # Obtained from: # Fixes: # MFC after: # Relnotes: # Security: # Event: # Sponsored by: # Pull Request: /pull/###> # Differential Revision: # # "Pull Request" and "Differential Revision" require the *full* GitHub or # Phabricator URL. The commit author should be set appropriately, using # `git commit --author` if someone besides the committer sent in the change. --- usr.sbin/bhyve/riscv/fdt.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/usr.sbin/bhyve/riscv/fdt.c b/usr.sbin/bhyve/riscv/fdt.c index 3ccd7ae5dc79..b9fe5ae6c32f 100644 --- a/usr.sbin/bhyve/riscv/fdt.c +++ b/usr.sbin/bhyve/riscv/fdt.c @@ -312,15 +312,15 @@ fdt_add_pcie(int intrs[static 4]) pin = i % 4; slot = i / 4; intr = intrs[(pin + slot) % 4]; - SET_PROP_U32(prop, 10 * i + 0, slot << 11); - SET_PROP_U32(prop, 10 * i + 1, 0); - SET_PROP_U32(prop, 10 * i + 2, 0); - SET_PROP_U32(prop, 10 * i + 3, pin + 1); - SET_PROP_U32(prop, 10 * i + 4, aplic_phandle); - SET_PROP_U32(prop, 10 * i + 5, 0); - SET_PROP_U32(prop, 10 * i + 6, 0); - SET_PROP_U32(prop, 10 * i + 7, intr); - SET_PROP_U32(prop, 10 * i + 8, IRQ_TYPE_LEVEL_HIGH); + SET_PROP_U32(prop, 9 * i + 0, slot << 11); + SET_PROP_U32(prop, 9 * i + 1, 0); + SET_PROP_U32(prop, 9 * i + 2, 0); + SET_PROP_U32(prop, 9 * i + 3, pin + 1); + SET_PROP_U32(prop, 9 * i + 4, aplic_phandle); + SET_PROP_U32(prop, 9 * i + 5, 0); + SET_PROP_U32(prop, 9 * i + 6, 0); + SET_PROP_U32(prop, 9 * i + 7, intr); + SET_PROP_U32(prop, 9 * i + 8, IRQ_TYPE_LEVEL_HIGH); } fdt_end_node(fdt);