From nobody Wed Aug 26 19:31:48 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 4hVZXP4SwGz6pYh0 for ; Wed, 26 Aug 2026 19:31:49 +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 4hVZXN4Z3hz3W5x for ; Wed, 26 Aug 2026 19:31:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787772708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DmpRCdbuhbAtR5CYsAgztNjibermvqxw6zgiIB0DhrM=; b=coPqRhAHYpMmqMoscoKzqY4jtQ0ql7p+yNZWZfpD3peYdh+W81AFVpwo+KdIkm+SCLnjVe qIILLUWS5z7wOaDXA4NZVhEfRjFS0nLzD5UCm7fTodCXVvo5H8SydKZQiV3Db0jq5/wZv6 iNK8jhBlBfy/+IPSOFy0RqbZT3jxhN2HAGZ5jSAits81EYB08YsZeFfyanKu4nAlMwYy1t V7x/iYD6ggNk3rhsLa2F7kxHIy1sR/gURkCxqFt9Cj+pcDp+yIcQwdAG6WsCDvaSZTHivJ nsC952QOBDzoA9GJwdAKWmUchOR8yjrd3E2COnMsWGVXvZ4w0TFTeYaMqvkkIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1787772708; a=rsa-sha256; cv=none; b=E4Ov6lTifyrETJNl88/Hf+wP+ffUx7zAUDxiqEDAfVsdfWos+7Oy3OakzFJ2+kVcekEa57 BY/XDIn51vY2UDkVrUDmbO7aJVKDgkQYDDndl41EddZRMm6rVVnnybtgkAiqFe8AntZrjb Mk+2Jbh/9fe3W2MyDiO5rZ9RfC5FZc3LG0BW03h3MIp7ynG4XClS0NUyqaF/Q/LniAEnYS cZblVQYT+pmlSHg6Ole9NI8nIRrNeW+7arwt60taEr85E1BL+cK+24ABXgzFD9vdni6iW9 dop1s6IahSU0E457YbF5EgijceJ+rxTicrwHE+nAAScUvddYmf882GbBn4sfyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1787772708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DmpRCdbuhbAtR5CYsAgztNjibermvqxw6zgiIB0DhrM=; b=OsvSmasvoM1S5TT1yBrvOoEmB0jEChiIOeml8JrVjpt2OQ/ppclwDlQV6AMZK1/BI9R8VJ tKJEl6MHF5fFVs1te+l+FCvt7dsd8e7s70TQ8L5lOO4F7SbyDFfKljNeFEvpg2QY3ju8E8 U4o/vV+VaDgtagLFb+Z1E4UWxPMM13J7ea/AvypvYKZY9tn/UxbzI6rVWfY/sQ6Kw7ouQ6 2JjdxXAM6b+hRO4I8uTDirkQoWd2mTjKOOi51TITmsr03uJbYxSLMOi4ABuoWLTDTwVXr4 c10WNMsR5uAg1QeH9TOziIrpZnrrx+JARKq/sCfovsHMjLi4272Pwah3RBPS1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hVZXN2hthzrKF for ; Wed, 26 Aug 2026 19:31:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1caee by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 26 Aug 2026 19:31:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 0ffad4ce5655 - main - bhyve: Tidy lobits handling in pci_passthru List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 0ffad4ce5655cbe412b79185d2b7924d0d72983e Auto-Submitted: auto-generated Date: Wed, 26 Aug 2026 19:31:48 +0000 Message-Id: <6a8f3f24.1caee.1af36a54@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0ffad4ce5655cbe412b79185d2b7924d0d72983e commit 0ffad4ce5655cbe412b79185d2b7924d0d72983e Author: John Baldwin AuthorDate: 2026-08-26 19:31:01 +0000 Commit: John Baldwin CommitDate: 2026-08-26 19:31:01 +0000 bhyve: Tidy lobits handling in pci_passthru - The lobits field in the "physical" BAR settings is never used, so don't bother setting it. - Expand the comment explaining why the existing lobits are preserved (namely, to preserve the prefetch flag on memory BARs). Reviewed by: bnovkov Differential Revision: https://reviews.freebsd.org/D58894 --- usr.sbin/bhyve/pci_passthru.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index 740d9ad45d03..615b0c639bbe 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -678,12 +678,14 @@ cfginitbar(struct passthru_softc *sc) sc->psc_bar[i].type = bartype; sc->psc_bar[i].size = size; sc->psc_bar[i].addr = base; - sc->psc_bar[i].lobits = 0; /* Allocate the BAR in the guest I/O or MMIO space */ pci_emul_alloc_bar(pi, i, bartype, size); - /* Use same lobits as physical bar */ + /* + * Use same lobits as physical BAR to preserve + * prefetch flag. + */ lobits = (uint8_t)passthru_read_config(&sc->psc_sel, PCIR_BAR(i), 0x01); if (bartype == PCIBAR_MEM32 || bartype == PCIBAR_MEM64) { @@ -691,7 +693,6 @@ cfginitbar(struct passthru_softc *sc) } else { lobits &= ~PCIM_BAR_IO_BASE; } - sc->psc_bar[i].lobits = lobits; pi->pi_bar[i].lobits = lobits; /*