From nobody Fri Jun 12 09:30:36 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 4gcDlP74K3z6hRGr for ; Fri, 12 Jun 2026 09:30: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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gcDlP4Txhz3y4Z for ; Fri, 12 Jun 2026 09:30:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781256641; 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=r9X8E1MJlwVulSb9VUVkNEKbkl1Z2VPnKE1IFtdUqKE=; b=KGHqSPaVzXeHam4PdUEsW5TLj0CDBKEwGmPH6YM7lYY41zY/P0VexcFMQd9fmVGwta3In1 9wvUj5AAyiE7aLo1MonZwWfAzlyXYup9+vC2ILBcWXY5WYFJe3UHgZgXCX8vWM+Aqlhqb5 b1sFLMoOrg67Iskx1lI6whbuQsMr5qqWWpgjxY0ooyHlKJykXFr721O1L7rbVrymk5C5YU WxVNVCV5uE6fsqty48J+8P1mZwMv2dh3TyrdFFgK+390VJGwPa/yPOnzhxTDcUVVmMTOoh U0TB6q94ICSEsMMtNJCSbh6+F5sAC4bRYsKVfy8QNXYc/ikOIAGOb+WZUE1WkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781256641; a=rsa-sha256; cv=none; b=per5slhNQO064zUDvt8KYD3OITJncnz3h9bMFa12R8KHEzcAZO/U+v06ExnePv8+DZWK3a f9jhvF2NCpTUU+HO0EpJOqSwMxWEytNEESGS0WCNHW7tj1kLgOsDxjCtrqQ3PKMRgV+FJd WyIXUMaotvuQ6+/gHVnMOqQUXVEl5DLwikMddXC//vzkoEitLRm3klV4Yo1QLqJhW4yK5f CpxY4IJ5Zn2+DYJnA99Y5Dnxf+zbMkYLGaIc3JvnNr7KSgLPakge8ZxzsDKVXrq9HIwLIL Ia/j1OmJkqKMWur7KeEQYzi+PgyPo/gzRtQifkLTlqMmqg6Du4X+BOsO7YiRSQ== 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=1781256641; 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=r9X8E1MJlwVulSb9VUVkNEKbkl1Z2VPnKE1IFtdUqKE=; b=UjFzvuDlPUS7t9/c+6vYAvtlf8xqimazle/fIu0iq/CzxW00aSkkw3ULEDexPlWu4VSVLZ +RxVQKLLhFo1g4dF9enkJe/GEoUJmBYnRj3al95Cp0y2yH7sZ1Igev48fZKBwcBfE/N4Ct tqkOS77sjXdivavdwD56Je7vYYg1039n8B1JohtUGYp4V7QwLFE48UCYO7WeUVsCUaKOFG bJHtvm5tflnFCJRxooJQDOqyuWgv9shyi4X8dyAPXnqBe0qpAxorQCDx30vSVlE83ANR2z Y8jISwA8JVV0ZCg1npaGY9AM4tT5l8tWtzBbAO2a3iAiKLrBvh5EUjNVs2WN7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gcDlP425bzVlF for ; Fri, 12 Jun 2026 09:30:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 333fb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Jun 2026 09:30:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan Novk=?utf-8?Q?ovi=C4=87?= Subject: git: 23c99b64918e - main - bhyve: Document vCPU range pinning 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: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23c99b64918eddb6084ffe4347faf95f82661c47 Auto-Submitted: auto-generated Date: Fri, 12 Jun 2026 09:30:36 +0000 Message-Id: <6a2bd1bc.333fb.ef578b1@gitrepo.freebsd.org> The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=23c99b64918eddb6084ffe4347faf95f82661c47 commit 23c99b64918eddb6084ffe4347faf95f82661c47 Author: Bojan Novković AuthorDate: 2026-06-05 17:31:01 +0000 Commit: Bojan Novković CommitDate: 2026-06-12 09:30:08 +0000 bhyve: Document vCPU range pinning This change documents the recently introduced changes to -p that allow users to specify CPU ranges instead of having to specify each individual mapping. While we're here, move the -p examples to the EXAMPLES section. Reviewed by: bcr MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57480 --- usr.sbin/bhyve/bhyve.8 | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index ec8c880b0243..73094f5dc23f 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 15, 2026 +.Dd June 5, 2026 .Dt BHYVE 8 .Os .Sh NAME @@ -80,7 +80,7 @@ .Sm on .Oc .Op Fl o Ar var Ns Cm = Ns Ar value -.Op Fl p Ar vcpu Ns Cm \&: Ns Ar hostcpu +.Oo Fl p Ar vcpuN Ns Oo - Ns Ar vcpuM Oc Ns Cm \&: Ns Ar hostcpuN Ns Oo - Ns Ar hostcpuM Oc Oc .Op Fl r Ar file .Sm off .Oo Fl s\~ @@ -356,19 +356,21 @@ for configuration options. .It Fl P Force the guest virtual CPU to exit when a PAUSE instruction is detected. This option applies only to the amd64 platform. -.It Fl p Ar vcpu Ns Cm \& : Ns Ar hostcpu -Pin guest's virtual CPU -.Em vcpu +.It Fl p Ar vcpuN Ns Oo - Ns Ar vcpuM Oc Ns Cm \&: Ns Ar hostcpuN Ns Op - Ns Ar hostcpuM +Pin the guest's virtual CPUs starting from +.Em vcpuN to -.Em hostcpu . +.Em vcpuM +to the host CPUs starting from +.Em hostcpuN +to +.Em hostcpuM . Host CPUs and guest virtual CPUs are numbered starting from 0. -A -.Fl p -option is required for every guest vCPU to be pinned. -To map a 4 vCPU guest to host CPUs 12-15: -.Bd -literal --p 0:12 -p 1:13 -p 2:14 -p 3:15 -.Ed +The +.Em vcpuM +and +.Em hostcpuM +arguments may be omitted. .It Fl r Ar file Resume a guest from a snapshot. The guest memory contents are restored from @@ -1403,6 +1405,16 @@ bhyve -c 2 -w -H \\ -n id=0,size=4G,cpus=0-1,domain_policy=prefer:0 \\ numavm .Ed +To run a virtual machine with a single vCPU pinned to host CPU 12: +.Bd -literal -offset indent +bhyve -c 1 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \\ + -l com1,stdio -H -P -m 1G -p 0:12 vm1 +.Ed +To run a virtual machine with 4 vCPUs pinned to host CPUs 12-15: +.Bd -literal -offset indent +bhyve -c 4 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \\ + -l com1,stdio -H -P -m 1G -p 0-3:12-15 vm1 +.Ed .Sh SEE ALSO .Xr bhyve 4 , .Xr netgraph 4 ,