Date: Sat, 16 Jan 2021 13:38:05 +1000 From: Peter Grehan <grehan@freebsd.org> To: Andrei Martin <andrei.cos.martin@gmail.com> Cc: freebsd-arm@freebsd.org, freebsd-virtualization@freebsd.org, Mihai Carabas <mihai.carabas@gmail.com>, Elena Mihailescu <elenamihailescu22@gmail.com>, Darius Mihai <dariusmihaim@gmail.com> Subject: Re: [bhyve][arm64] Number of allowed vcpus Message-ID: <f6bfa9b7-7a8c-23a2-6c2c-0aa481f29907@freebsd.org> In-Reply-To: <CAC%2BC28R_NgsTbRj89xf54Fdx5Rj8oEUF-OY=pSKKBrrm0b-JJg@mail.gmail.com> References: <CAC%2BC28QevGZZhb5trdA=UN-yZp_rLF1pkA8CPhzE3WUuhRv0pw@mail.gmail.com> <CAC%2BC28R_NgsTbRj89xf54Fdx5Rj8oEUF-OY=pSKKBrrm0b-JJg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Andrei, > I've summed up your proposals and sketched and algorithm: > N - the number of vcpus from the '-c' parameter > X - the number of vcpus from the device tree > > if there isn't the parameter -> start the vm with X vcpus > if there is the parameter --> if N <= X -> start the vm with N parameters > |-> if N > X -> throw an error > > I believe this gives the opportunity to rebuild the device tree and use all > vcpus (first branch) > or let the device tree as it is (more vcpus) but use only a subset of them. > Is this alright? If you are going to have the ability to rebuild the device tree, you might as well do it every time. If a user hasn't specified how many vCPUs on the command line, it's safe to assume a default of 1. later, Peter.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f6bfa9b7-7a8c-23a2-6c2c-0aa481f29907>