From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: Re: [PATCH] kvm tools: Default guest cpu count to host cpu count Date: Fri, 20 May 2011 00:00:25 +0400 Message-ID: <4DD576D9.4010000@gmail.com> References: <1305748584-9411-1-git-send-email-levinsasha928@gmail.com> <4DD569A7.6050608@gmail.com> <4DD56AC2.9050702@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Sasha Levin , penberg@kernel.org, mingo@elte.hu, asias.hejun@gmail.com, prasadjoshi124@gmail.com, kvm@vger.kernel.org To: David Ahern Return-path: Received: from mail-fx0-f46.google.com ([209.85.161.46]:59365 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933926Ab1ESUA2 (ORCPT ); Thu, 19 May 2011 16:00:28 -0400 Received: by fxm17 with SMTP id 17so2253497fxm.19 for ; Thu, 19 May 2011 13:00:27 -0700 (PDT) In-Reply-To: <4DD56AC2.9050702@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/19/2011 11:08 PM, Cyrill Gorcunov wrote: ... >> >> What prevents nr_online_cpus from being greater than KVM_NR_CPUS? Since >> that latter is a #define, might want to change 'else if' to if there. >> >> David >> > > Good catch! We should add a constraint here and limit it to KVM_NR_CPUS. > Heh, actually it get catched futher in code by max_cpus = kvm__max_cpus(kvm); if (nrcpus > max_cpus) { printf(" # Limit the number of CPUs to %d\n", max_cpus); kvm->nrcpus = max_cpus; } so no issue here (except that MP table can support a limited number of cpus and for 32bit apic addressing we need ACPI support implemented I think). -- Cyrill