From nobody Thu Nov 19 20:47:41 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 4jVrBj4rNCz71D0Z for ; Thu, 19 Nov 2026 20:47:41 +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 4jVrBj41WFz4vQ5 for ; Thu, 19 Nov 2026 20:47:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795121261; 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=Wxn2hjnBbMbLRAgLGyvHLS2ENaEeqFYhXlPu81ytcVE=; b=kS9mFN1mdC4b4nIc69pn7FHgGytew+lehgSuZzWaibIHvsmu58AcZUORYWy0Oe7c6IAFQx vshVvIxys6T1LpS2MCma67QPClwssquMo80IlJ7NjkFGsLDZ3oaWYVzzSu4sJ0WuyNMV1Y 2oKH3QSB56/lHsZdVeJF355D+w7VOhE7xDhiYGefxwM3z13a13rinpZ+c9cdCbjlP1fK4F c8NQ/dxl3M4SBIhSgcjWnL2qV02Lpbmh72Xd3cMV/GW2LVBjJ06M1tc4yYADS0XVH1NQUl QXEbxC9q+8S5fwGwYz6wJCMTAu1+aqMiPa29Cv8miifMFea1xClw323I2yAjzw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795121261; b=j/MIrTOH9rZ9f0Zxkf2RAqCsqQbfvDO+vMFxEonIgMExeYN0uZrcAs1bz7pK3a02bBE8qr oGsJEueyBic+PGEeeFlQTm7+niUwlUrQXSfeAdi1eWCB0+5RJu+iKy6jE1JP1+NVpm0tDH vtandZHr0JHDq05fxvH7nXf2CIDq3Jt/UrBleUl5vBqVVkgNMB7ThQ/vXWHN4kpUKE2a8a SUQ/Ch21wGUL9nfQvGO85on8s5PLm8dFvaCULXyecAWnDwU/0CtlKBJ+BkUvlgSrjjIn4i qb1JrR2w0uhKM6bCceOKpG/wX1IL3KGY3ztmvVSbXPCkgyHf6a3pYT4f42tiUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795121261; 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=Wxn2hjnBbMbLRAgLGyvHLS2ENaEeqFYhXlPu81ytcVE=; b=us1mwmQctzloQ8OduZ8aJSxxmTHEQ2Q97mhRirc//V3EZrkS8/0cvWPOBa7KjswYUcipRo Kpn+RSK9DkStqTOUC181pi4rRIdL9lWSHqiY8P7kp11Pcly3URNrBgHRhQpEhymhgFgQwa yyYN1TToRrKIwmHu9231Bqf9pLp4tflqmUSKNyXEa6DJZP/nHHOSR9gAO/HlJotVjye3iP RM8qP2SPRBdCXiXfDk8v+TJrjPuMzNvR1Owo30DcUqWy9Z6/hsFYkSLfCYRpFVWomlD7AG i3QdSz4vp8D6C6j//lUvlRzjOTg0huMhPALozcHhLt4oGLiSxDGcJN/551KNeQ== 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 4jVrBj31DHzGm6 for ; Thu, 19 Nov 2026 20:47:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id da03 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 19 Nov 2026 20:47:41 +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: d851c6840205 - 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: d851c68402058bb79b0a03fc76b2951af87d4fcf Auto-Submitted: auto-generated Date: Thu, 19 Nov 2026 20:47:41 +0000 Message-Id: <6aff606d.da03.4404d4a@gitrepo.freebsd.org> The branch stable/15 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=d851c68402058bb79b0a03fc76b2951af87d4fcf commit d851c68402058bb79b0a03fc76b2951af87d4fcf Author: Doongar Singh AuthorDate: 2026-11-13 12:35:14 +0000 Commit: Jessica Clarke CommitDate: 2026-11-19 20:45:46 +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) --- 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);