From nobody Fri Nov 20 00:10:07 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 4jVwhJ0Dp1z71gKm for ; Fri, 20 Nov 2026 00:10:08 +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 4jVwhH6cbXz4P1J for ; Fri, 20 Nov 2026 00:10:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795133407; 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=hJGMSvY1CsPajDuT783WFgDgmMPLxnQ8M7p36de3Z6c=; b=faggP1xKc7ciGX+ZypZR4DDsdXOuNH4MHaA0Mn74DK8dpUsnBnP4/zwY3VrsUSvay5qmG/ oenwOWjf7jvE4wzo3P6H1FKWbcuX24WOM1m3S3TImFmwnaT/fPkqORp6k9x0JG+//6YQko 1VZ8haWRf9EJYaPY3++XgqqqNnS8j/LgWf9gYYx4zmNG39t6mTgyo0I2B9mzFBBS/f8msC ylBPZHAQ8g/Yj2Ur++vkpVnrFdXGnbb/ANUCFh32L0L4PNcX+GEs+vdGmjtGxk5uEr1FIp 0nm4ZtSLwYGTmRx1Hk81cpRwJKL8a2l0PEeu1Hzmr0WwYx/2bLCBRH2OGlHF7A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795133407; b=D6o0d8kHE+c6j3gIXsig+OyNWsDn9ETT04z8Zu3O0xbUIGzLw4UmhbNs1ZzVUulazLAjFi 4HfV9hi3MOgHZOgTwzaZZBf4uWVW3otUVdDBnT4dcGF1SBiMp6l8Vw0ziN6GwOyP62QqH7 j+Wrc+7zpjCowwRywRUzt8NZ2LlR04hhpVBSOA4m0EXVr0zpY8FAweyweWif2KtR8pV7tQ r61RcV3MqrILzenwr3UlGilLJamhQZ9Jx/7Zg/6pp8uKkxrMRUE7M66yOKJVIzBMYd+Ube wnQVz2VgPk+rV/wVrD1b5SwcoW16mbrRrrMVM8lc3zvYMYx6u/M3rp7hYeGAdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795133407; 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=hJGMSvY1CsPajDuT783WFgDgmMPLxnQ8M7p36de3Z6c=; b=geaXNrs2UY9gOBagHkATZ4D9NVLYdX2KtSbqiFc9mJwktfxoxt4Dd1kVSVgA8Fo0zHn9b2 ImodTDpWGsh8TkKecni4Pdo9ZOnQsyKn6E2Ia8zBvalK7bJVOGMzpwKSnSweQwyUl73Ck8 oegP5lXvk8Zixzs6F0PYvZZbZDwbrHK/yscJ3xNSiz+ShmuWUTiNGpEzM+JTXIcvxKqwFZ od0yivSyYF9E/JBbIaxa3FdWvJ19V8d38lVHhVZWgJjt1zNZVQIgatldkay2dUEJaX2ln7 zFzXpm+5dBFkkdyHvzb7dRRLZwVTzC0ujcrlSysH3o9lxjdg6d0J/9wHIymEeA== 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 4jVwhH6GVCzMyn for ; Fri, 20 Nov 2026 00:10:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22a86 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 20 Nov 2026 00:10:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Doongar Singh From: Colin Percival Subject: git: d713a8192588 - releng/15.2 - 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.2 X-Git-Reftype: branch X-Git-Commit: d713a8192588cb5e467cf4b2ea4507e70cf91635 Auto-Submitted: auto-generated Date: Fri, 20 Nov 2026 00:10:07 +0000 Message-Id: <6aff8fdf.22a86.7291b84b@gitrepo.freebsd.org> The branch releng/15.2 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d713a8192588cb5e467cf4b2ea4507e70cf91635 commit d713a8192588cb5e467cf4b2ea4507e70cf91635 Author: Doongar Singh AuthorDate: 2026-11-13 12:35:14 +0000 Commit: Colin Percival CommitDate: 2026-11-20 00:09:51 +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. Approved by: re (cperciva) 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) (cherry picked from commit d851c68402058bb79b0a03fc76b2951af87d4fcf) # 72 columns --| # # Uncomment and complete these metadata fields, as appropriate: # # PR: # Reported by: # Reviewed by: # Tested by: # Approved by: # Obtained from: # Fixes: # MFC after: # MFH: # Relnotes: # Security: # 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);