From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH V2] Xen: support maxvcpus in xm and xl config Date: Wed, 16 Dec 2015 10:11:14 +0000 Message-ID: <1450260674.16856.233.camel@citrix.com> References: <1450218051-25842-1-git-send-email-jfehlig@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1450218051-25842-1-git-send-email-jfehlig@suse.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jim Fehlig , libvir-list@redhat.com Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2015-12-15 at 15:20 -0700, Jim Fehlig wrote: > From: Ian Campbell > > xend prior to 4.0 understands vcpus as maxvcpus and vcpu_avail > as a bit map of which cpus are online (default is all). > > xend from 4.0 onwards understands maxvcpus as maxvcpus and > vcpus as the number which are online (from 0..N-1). The > upstream commit (68a94cf528e6 "xm: Add maxvcpus support") > claims that if maxvcpus is omitted then the old behaviour > (i.e. obeying vcpu_avail) is retained, but AFAICT it was not, > in this case vcpu==maxcpus==online cpus. This is good for us > because handling anything else would be fiddly. > > This patch changes parsing of the virDomainDef maxvcpus and vcpus > entries to use the corresponding 'maxvcpus' and 'vcpus' settings > from xm and xl config. It also drops use of the old Xen 3.x > 'vcpu_avail' setting. > > The change also removes the maxvcpus limit of MAX_VIRT_VCPUS (since > maxvcpus is simply a count, not a bit mask), which is particularly > crucial on ARM where MAX_VIRT_CPUS == 1 (since all guests are > expected to support vcpu placement, and therefore only the boot > vcpu's info lives in the shared info page). > > Existing tests adjusted accordingly, and new tests added for the > 'maxvcpus' setting. > > Signed-off-by: Jim Fehlig Acked-by: Ian Campbell Tested-by: Ian Campbell (as far as "domxml-from-native xen-xl" goes, I seem to have another issue actually starting a domain on ARM, which I'll investigate...)