git: 320ce3c3c56b - stable/13 - bhyve: Remove vestigial support for setting max vCPUs.

From: Corvin Köhne <corvink_at_FreeBSD.org>
Date: Thu, 17 Aug 2023 13:29:33 UTC
The branch stable/13 has been updated by corvink:

URL: https://cgit.FreeBSD.org/src/commit/?id=320ce3c3c56bb0b52236d67c995a9d669e7a5bd2

commit 320ce3c3c56bb0b52236d67c995a9d669e7a5bd2
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-06-12 10:47:35 +0000
Commit:     Corvin Köhne <corvink@FreeBSD.org>
CommitDate: 2023-08-17 13:06:51 +0000

    bhyve: Remove vestigial support for setting max vCPUs.
    
    The kernel part of the hypervisor is not going to support per-VM maxcpu
    limits. The topology is only used to control the values returned by
    CPUID leaves for which max vCPUs is not relevant.
    
    Reviewed by:            corvink, markj
    MFC after:              1 week
    Differential Revision:  https://reviews.freebsd.org/D37176
    
    (cherry picked from commit bb1770105022e7d65bef0f32988c08ee9676b68e)
---
 usr.sbin/bhyve/bhyverun.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
index 14a4eb9cabec..63ca9439d6e6 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -293,10 +293,6 @@ topology_parse(const char *opt)
 			set_config_value("cores", cp + strlen("cores="));
 		else if (strncmp(cp, "threads=", strlen("threads=")) == 0)
 			set_config_value("threads", cp + strlen("threads="));
-#ifdef notyet  /* Do not expose this until vmm.ko implements it */
-		else if (strncmp(cp, "maxcpus=", strlen("maxcpus=")) == 0)
-			set_config_value("maxcpus", cp + strlen("maxcpus="));
-#endif
 		else if (strchr(cp, '=') != NULL)
 			goto out;
 		else
@@ -1136,8 +1132,7 @@ do_open(const char *vmname)
 			exit(4);
 		}
 	}
-	error = vm_set_topology(ctx, cpu_sockets, cpu_cores, cpu_threads,
-	    0 /* maxcpus, unimplemented */);
+	error = vm_set_topology(ctx, cpu_sockets, cpu_cores, cpu_threads, 0);
 	if (error)
 		errx(EX_OSERR, "vm_set_topology");
 	return (ctx);