From nobody Wed Apr 24 13:58:26 2024 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 4VPgYt6fNbz5HQFm; Wed, 24 Apr 2024 13:58:26 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPgYt2KyLz4Vdq; Wed, 24 Apr 2024 13:58:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713967106; 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=GUx6ubs4almqD2UAEk2SpzMxB+eTLrOLNKHhO1iClp0=; b=WsaXPFTOIf39ZDl5/OUc+M9C2fKK+G6AKIdWru1mnGoH+4CxETOAn3PVv5XnY3HSKTKCtl SHSsalMrPPlZeo5KNjWPFCv4pFYegOLdhqf0xwFUUoawYkn4vbZm6UQ7ceT6yTj+yR2YtY wuXc9OBNczXz6xCiBkvXU0Vt3sq1zw4Q4m2KTSvy54Y2cnhiEIdLY4YzET6TAtE+OWG3nx jZOAg2yYn7RlvlgenA9RYvzAh3u1Kz4RXoZaQiVs3KyIvMpk7n6AGd4I1skwZ/lhCEOkxf CR5+eMEZvD8tlhp5r/r+gBe7m5bzN8CkSxTAltDQkKQ10i2REknKiQsJSVoZcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713967106; a=rsa-sha256; cv=none; b=xGLwmYnHNgEmwyGwmFFEmVAPXWJcu+t6MQ7TFknu+N29rl6QnO+0CW5xfGi5B4qyc4JxSu LfnuVW0EOkByLgQ/GUAaL0Z7yLsbqGOz48J8CczOWG+e0w5kFA6WMoGjnEYdXRh526g8hp TlxF0aG2IxloDVSRXUaA0HbhVp42Iqu5GPIsaHe56pNhlA9m+RGGjSjmvJOipeYzHKOtP6 32O7myU5RZanDBo25FOJE286EmRJc3hAygPQoabI6xXG8zUjNqRupq5Ktd7Jfxt9j0sUxj 2KQhmtWyAlT3epj96+18Qwgkjbqfo+FNwUpzP8N5XiVmBvhQhXTgh+/Fl4D/RA== 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=1713967106; 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=GUx6ubs4almqD2UAEk2SpzMxB+eTLrOLNKHhO1iClp0=; b=X/GUKzpIXN/ioMN2rLH3V9oTWYOU/D04l5HG3erSXJgWclKSzFBAXoEv4vBhO7jHnVZl3E qU+JHMm77VM9Yg/IFSAlsJnWeEK3ivtdguZ2o2SCB/vvaWDNiY0EUdXvpUW8eBkcjX4OiA tOj0OnyL0+hO942/q5C0TIHzWdnPVYKdfDYJyyX/t413SJXWhcs2LLFrz9GXnQJf/jQEeT uklyufL8gH3xG7bHnCCQWezDWsNX4BG9T4wcdNQq9WMl6Ru60yi0rMRz1jUF+ifTzSNk2n SUnuTXIbuzz+nkTUvIb7aaIjirZeOfc6hsFoR/yrfBh8esTaA85Hd6vuTwZytQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VPgYt1wKfzH80; Wed, 24 Apr 2024 13:58:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43ODwQM5021543; Wed, 24 Apr 2024 13:58:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43ODwQxY021540; Wed, 24 Apr 2024 13:58:26 GMT (envelope-from git) Date: Wed, 24 Apr 2024 13:58:26 GMT Message-Id: <202404241358.43ODwQxY021540@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 71b2ba909911 - main - bhyve.8: Document arm64 support 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 71b2ba9099115db3c63f15e5085c0a677511f8b8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=71b2ba9099115db3c63f15e5085c0a677511f8b8 commit 71b2ba9099115db3c63f15e5085c0a677511f8b8 Author: Mark Johnston AuthorDate: 2024-04-24 13:57:42 +0000 Commit: Mark Johnston CommitDate: 2024-04-24 13:58:04 +0000 bhyve.8: Document arm64 support - Mention the options that are amd64-only. - Provide a minimal example for booting an arm64 guest. Reviewed by: corvink Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D44738 --- usr.sbin/bhyve/bhyve.8 | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 31b093ffaad0..42ba328451a9 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -93,17 +93,25 @@ .Nm is a hypervisor that runs guest operating systems inside a virtual machine. +It can run guests on amd64 and arm64 platforms with suitable hardware support. .Pp Parameters such as the number of virtual CPUs, amount of guest memory, and I/O connectivity can be specified with command-line parameters. .Pp +.Nm +is typically used with a boot ROM that can load the guest operating system. +On arm64 platforms, this is currently required. If not using a boot ROM, the guest operating system must be loaded with .Xr bhyveload 8 or a similar boot loader before running .Nm , -otherwise, it is enough to run -.Nm -with a boot ROM of choice. +otherwise. +On amd64, the +.Pa edk2-bhyve +package provides a UEFI firmware that can be used to boot the guest; +on arm64 the +.Pa u-boot-bhyve-arm64 +package provides a U-Boot image that can be used to boot the guest. .Pp .Nm runs until the guest operating system reboots or an unhandled hypervisor @@ -112,10 +120,11 @@ exit is detected. .Bl -tag -width 10n .It Fl a The guest's local APIC is configured in xAPIC mode. -The xAPIC mode is the default setting so this option is redundant. +This option only applies to the amd64 platform. +xAPIC mode is the default setting so this option is redundant. It will be deprecated in a future version. .It Fl C -Include guest memory in core file. +Include guest memory in core files. .It Fl c Op Ar setting ... Number of guest virtual CPUs and/or the CPU topology. @@ -154,7 +163,7 @@ Destroy the VM on guest initiated power-off. Force .Nm to exit when a guest issues an access to an I/O port that is not emulated. -This is intended for debug purposes. +This is intended for debug purposes and only applies to the amd64 platform. .It Fl f Ar name Ns Cm \&, Ns Oo Cm string Ns No | Ns Cm file Ns Oc Ns Cm \&= Ns Ar data Add a fw_cfg file .Ar name @@ -187,6 +196,7 @@ will pause execution at the first instruction waiting for a debugger to attach. .It Fl H Yield the virtual CPU thread when a HLT instruction is detected. If this option is not specified, virtual CPUs will use 100% of a host CPU. +This option applies only to the amd64 platform. .It Fl h Print help message and exit. .It Fl k Ar config_file @@ -235,6 +245,12 @@ The possible values for the argument are listed in the .Fl s flag description. +.Pp +This option applies only to the amd64 platform. +On arm64, the console and boot ROM devices are configured using the +more generic +.Fl o +option. .It Xo .Fl m Ar memsize Ns Oo .Sm off @@ -260,8 +276,12 @@ Set the configuration variable .Ar var to .Ar value . +See +.Xr bhyve_config 5 +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 @@ -938,8 +958,10 @@ Ignore accesses to unimplemented Model Specific Registers (MSRs). This is intended for debug purposes. .It Fl x The guest's local APIC is configured in x2APIC mode. +This option applies only to the amd64 platform. .It Fl Y Disable MPtable generation. +This option applies only to the amd64 platform. .It Ar vmname Alphanumeric name of the guest. This should be the same as that created by @@ -1033,6 +1055,12 @@ bhyve -c 2 -s 0,hostbridge -s 1,lpc -s 2,virtio-blk,/my/image \\ -l com1,stdio -H -P -m 1G vm1 .Ed .Pp +To do the same on arm64: +.Bd -literal -offset indent +.Ed +bhyve -c 2 -s 0,hostbridge -s 1,virtio-blk,/my/image -o console=stdio \\ + -o bootrom=/usr/local/share/u-boot/u-boot-bhyve-arm64/u-boot.bin -m 1G vm1 +.Pp Run a 24GB single-CPU virtual machine with three network ports, one of which has a MAC address specified: .Bd -literal -offset indent