From nobody Fri Nov 13 12:39:03 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 4jQxdh0Y1Zz70W1T for ; Fri, 13 Nov 2026 12:39:04 +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 4jQxdg5DYSz4VgB for ; Fri, 13 Nov 2026 12:39:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794573543; 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=Ra6dw1TGUnPKQJ8dFPMrsOCcHm7rpuOfgKfRlwzZ5SQ=; b=e9txAJBIBzK3OWtSAKtXkBdakguVPxWCzIhmEndeMsWgzpFKnRKroUBA2walQqyA6GnB9v v9E6uqMphULmghPzWOX2F9KiQ2iJcxJcB+91dgyaEfKS32FGsQ74OxISjFH3XZ0H8nZFcC +phILQj8FDfJNj1cYDPztohCL4AQNOksSfiOwluBusx+qBHIHM0F5fnFPjnY+Ro0MldNCB rLLcOBkCGLA1Dnrqzvj+LsBspmt8esO3KWeFKhX4H87ugiDT+mk4h/4ptKzRJVE6MOvuKl +2qgRR1nTBP5ib1u/HSIFZhHKSVxoMGOXRtubCjZv2RD79Csb3M/AoVWUKP7Rw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794573543; b=O/eu+lFW3IwR7/qbo5x2HYuNDVP7SJoOKP2f1jZCSnMMG47FGHyhMPLp8oKF9L3wM1lAoK xUyyKWrNULwCC4d51jgpK01G0WiEJq8OpbJaDHPTy0jl9wgsBA4Qx8vukxTPo/yk9V/ht7 ypdw0KwfvnhLWwJuiKhdadQipSbi6Ph4xcWnKOULUT3hXUY9ibyg2jRCRtCyOjOzVFc/02 DTL7MMekKv86iIjIlwMtGXTListNfSWD6hQG8BKFNpvkv61Kv7fH3F/jzJdmjo38J3MStS IhOuQZf8EkW2ygLF4Zla3svBPh3fAEUIYNOMxbpT1b8HaeHAv2X/ysZ+QQkaXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794573543; 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=Ra6dw1TGUnPKQJ8dFPMrsOCcHm7rpuOfgKfRlwzZ5SQ=; b=qkY8o+lCKsJ8vJnhkXup6jTUbAzuhodGq6HPimsown0rmHk5pGzbj8+yxEWMHzoVppXbtx qKYQpFxzflkH6+MDyNqWz3gVOiHRkocjSV2py+OXuaCFQopOh/Ec9xsAo5A2sM/mrEbsdz PW8AE7Roe5LNvKDatMaNzBtzsFQAmscuO+RBJ/4dXbDhWnqaX/ovmCKA/v/yes6og4BClV Daq5NKCj+YRQVgE05gVkNT6zY4pqivQjiAQsNulr3CjGk0YCqZx2yI/NtzR0PUmytOen7f kwX7WWOlZ/UxW/pOel7zjI69y9pz5wrOJ8idZyOTwW2w+G/xQPCk7JSfJEiD9w== 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 4jQxdg47nhzbqb for ; Fri, 13 Nov 2026 12:39:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19d2c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 13 Nov 2026 12:39:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Doongar Singh From: Jessica Clarke Subject: git: fabdac3abcbb - main - 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/main X-Git-Reftype: branch X-Git-Commit: fabdac3abcbb06551415ca64b69b0e29946834f9 Auto-Submitted: auto-generated Date: Fri, 13 Nov 2026 12:39:03 +0000 Message-Id: <6af704e7.19d2c.37126c47@gitrepo.freebsd.org> The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=fabdac3abcbb06551415ca64b69b0e29946834f9 commit fabdac3abcbb06551415ca64b69b0e29946834f9 Author: Doongar Singh AuthorDate: 2026-11-13 12:35:14 +0000 Commit: Jessica Clarke CommitDate: 2026-11-13 12:37:35 +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 --- 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);