git: 27537022c5a4 - stable/13 - bhyve: Don't force an upper bound on vCPUs when parsing pinning.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 11 May 2022 18:56:09 UTC
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=27537022c5a4f3ae764c95e37a3700a65ef854a4

commit 27537022c5a4f3ae764c95e37a3700a65ef854a4
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-03-09 23:39:16 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-05-11 18:51:56 +0000

    bhyve: Don't force an upper bound on vCPUs when parsing pinning.
    
    Even today it is possible to specify pinning for a vCPU higher than
    the configured number of CPUs but lower than VM_MAXCPU without raising
    an error.
    
    Reviewed by:    grehan
    Differential Revision:  https://reviews.freebsd.org/D34492
    
    (cherry picked from commit fd6f92946f02b451c792bfdbc94259ff65e49969)
---
 usr.sbin/bhyve/bhyverun.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
index 43032b9f78fa..3a474fcdf270 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -392,9 +392,8 @@ pincpu_parse(const char *opt)
 		return (-1);
 	}
 
-	if (vcpu < 0 || vcpu >= VM_MAXCPU) {
-		fprintf(stderr, "vcpu '%d' outside valid range from 0 to %d\n",
-		    vcpu, VM_MAXCPU - 1);
+	if (vcpu < 0) {
+		fprintf(stderr, "invalid vcpu '%d'\n", vcpu);
 		return (-1);
 	}