git: 2d3d2475c99f - releng/14.0 - bhyve: Document the hw.vmm.maxcpu tunable and the current limit on vCPUs

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 25 Oct 2023 00:41:43 UTC
The branch releng/14.0 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=2d3d2475c99f0be30ec4bb15eae5a435039c742e

commit 2d3d2475c99f0be30ec4bb15eae5a435039c742e
Author:     Yuri Pankov <yuripv@FreeBSD.org>
AuthorDate: 2023-10-12 19:49:47 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-10-24 19:26:57 +0000

    bhyve: Document the hw.vmm.maxcpu tunable and the current limit on vCPUs
    
    Reviewed by:    corvink (original version)
    Co-authored-by: John Baldwin <jhb@FreeBSD.org>
    Differential Revision:  https://reviews.freebsd.org/D40074
    
    (cherry picked from commit da202b0fe616e9314739f01493ae310e37a36d8d)
    (cherry picked from commit cfdb5e70adb3614f70a35240eab89519a5536d2c)
    
    Approved by:    re (gjb)
---
 share/man/man4/vmm.4   | 12 +++++++++++-
 usr.sbin/bhyve/bhyve.8 | 12 ++++++++++--
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/share/man/man4/vmm.4 b/share/man/man4/vmm.4
index e94f0ccaeac8..cb3276a7d8f1 100644
--- a/share/man/man4/vmm.4
+++ b/share/man/man4/vmm.4
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 19, 2013
+.Dd October 12, 2023
 .Dt VMM 4
 .Os
 .Sh NAME
@@ -79,6 +79,16 @@ The
 and
 .Va pptdevs3
 variables can be used for additional entries.
+.Sh LOADER TUNABLES
+Tunables can be set at the
+.Xr loader 8
+prompt before booting the kernel or stored in
+.Xr loader.conf 5 .
+.Bl -tag -width indent
+.It Va hw.vmm.maxcpu
+Maximum number of virtual CPUs.
+The default is the number of physical CPUs in the system.
+.El
 .Sh EXAMPLES
 Reserve three PCI devices for use by the hypervisor: bus 10 slot 0 function 0,
 bus 6 slot 5 function 0, and bus 6 slot 5 function 1.
diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8
index 7eddeec4647a..21313e0fcad4 100644
--- a/usr.sbin/bhyve/bhyve.8
+++ b/usr.sbin/bhyve/bhyve.8
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd May 5, 2023
+.Dd October 12, 2023
 .Dt BHYVE 8
 .Os
 .Sh NAME
@@ -131,7 +131,6 @@ The default value for each of
 and
 .Ar threads
 is 1.
-The current maximum number of guest virtual CPUs is 16.
 If
 .Ar numcpus
 is not specified then it will be calculated from the other arguments.
@@ -145,6 +144,15 @@ and
 If a
 .Ar setting
 is specified more than once the last one has precedence.
+.Pp
+The maximum number of virtual CPUs defaults to the number of active
+physical CPUs in the system available via the
+.Va hw.vmm.maxcpu
+.Xr sysctl 8
+variable.
+The limit can be adjusted via the
+.Va hw.vmm.maxcpu
+loader tunable.
 .It Fl D
 Destroy the VM on guest initiated power-off.
 .It Fl e