From owner-freebsd-arm@freebsd.org Thu Jan 14 12:59:03 2021 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 84ED44E160A for ; Thu, 14 Jan 2021 12:59:03 +0000 (UTC) (envelope-from SRS0=35cs=GR=freebsd.org=grehan@iredmail.onthenet.com.au) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGksL4FLpz3p8M for ; Thu, 14 Jan 2021 12:59:01 +0000 (UTC) (envelope-from SRS0=35cs=GR=freebsd.org=grehan@iredmail.onthenet.com.au) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTPS id 6DF77209C026 for ; Thu, 14 Jan 2021 22:58:54 +1000 (AEST) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id 4EAD920B4BEB for ; Thu, 14 Jan 2021 22:58:54 +1000 (AEST) Received: from iredmail.onthenet.com.au ([127.0.0.1]) by iredmail.onthenet.com.au (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kGYx9JJj3GYI for ; Thu, 14 Jan 2021 22:58:54 +1000 (AEST) Received: from MacBook-Air-4.local (CPE-120-29-56-125.dsl.OntheNet.net [120.29.56.125]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id 0FE6F20B4AA4; Thu, 14 Jan 2021 22:58:54 +1000 (AEST) Subject: Re: [bhyve][arm64] Number of allowed vcpus To: Andrei Martin References: Cc: freebsd-arm@freebsd.org, freebsd-virtualization@freebsd.org, Elena Mihailescu , Darius Mihai , Mihai Carabas From: Peter Grehan Message-ID: <6270e79e-f442-9509-94c7-840779a99cb2@freebsd.org> Date: Thu, 14 Jan 2021 22:58:53 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=BZdDLol2 c=1 sm=1 tr=0 a=A6CF0fG5TOl4vs6YHvqXgw==:117 a=m3qNZo/yBXrAh/Cjk+GdxQ==:17 a=IkcTkHD0fZMA:10 a=EmqxpYm9HcoA:10 a=e4bApMnwJW7y-YsUrZUA:9 a=QEXdDO2ut3YA:10 X-Rspamd-Queue-Id: 4DGksL4FLpz3p8M X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of SRS0=35cs=GR=freebsd.org=grehan@iredmail.onthenet.com.au has no SPF policy when checking 203.13.68.12) smtp.mailfrom=SRS0=35cs=GR=freebsd.org=grehan@iredmail.onthenet.com.au X-Spamd-Result: default: False [0.10 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[203.13.68.12:from]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[grehan@freebsd.org,SRS0=35cs=GR=freebsd.org=grehan@iredmail.onthenet.com.au]; RCVD_IN_DNSWL_LOW(-0.10)[203.13.68.12:from]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[203.13.68.12:from]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[grehan@freebsd.org,SRS0=35cs=GR=freebsd.org=grehan@iredmail.onthenet.com.au]; ASN(0.00)[asn:9313, ipnet:203.13.68.0/23, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[203.13.68.12:from:127.0.2.255]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 12:59:03 -0000 Hi Andrei, > While working on enabling multiple virtual cpus for the arm64 virtual > machine > I used the bhyve's "-c N" parameter to create N cpus (it gets only the > cpus, in contrast to the amd64). If N is smaller than the number of cores > described in the device tree it will enable only N and if it's larger it > will enable only the number of cores from the device tree. > > I don't know if it is the best approach. Another way would be to enable all > the cpus from the device tree, no more, no less. > > Do you have any suggestions? My suggestion to generate the device tree based on VM configuration. bhyve on amd64 already does this for ACPI tables. (I do understand that this is more difficult for bhyveload on ARM64 since the device tree has to be known at load time, and bhyveload is only given a subset of parameters: however it may be possible to reserve space at a fixed location and then have bhyve copy a generated table into that region). later, Peter.