Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Mar 2022 23:57:34 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: fd6f92946f02 - main - bhyve: Don't force an upper bound on vCPUs when parsing pinning.
Message-ID:  <202203092357.229NvYJl004796@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

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

commit fd6f92946f02b451c792bfdbc94259ff65e49969
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-03-09 23:39:16 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-03-09 23:39:16 +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
---
 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 72e95c0e4627..4989915791b5 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -393,9 +393,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);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203092357.229NvYJl004796>