git: fd6f92946f02 - main - bhyve: Don't force an upper bound on vCPUs when parsing pinning.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 09 Mar 2022 23:57:34 UTC
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); }