From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel P. Berrange" Subject: Re: [patch] qemu-kvm introduce -maxcpus argument Date: Fri, 19 Jun 2009 15:15:27 +0100 Message-ID: <20090619141527.GA18392@redhat.com> References: <4A3B99DD.50306@gmail.com> Reply-To: "Daniel P. Berrange" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Gleb Natapov , "kvm@vger.kernel.org" To: Jes Sorensen Return-path: Received: from mx1.redhat.com ([66.187.233.31]:53036 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752251AbZFSOP5 (ORCPT ); Fri, 19 Jun 2009 10:15:57 -0400 Content-Disposition: inline In-Reply-To: <4A3B99DD.50306@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Jun 19, 2009 at 03:59:57PM +0200, Jes Sorensen wrote: > Hi, > > This one introduces a -maxcpus setting, allowing the user to specify > the maximum number of vCPUs the system can have, as discussed with Gleb > earlier in the week. What is the maximum value for the 'maxcpus' setting for KVM ? libvirt currently does fd = open("/dev/kvm") r = ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_NR_VCPUS); to figure out what the maximum allowed vCPUs will be for KVM, and currently it is returning 16 IIRC. > @@ -5666,6 +5667,13 @@ int main(int argc, char **argv, char **e > exit(1); > } > break; > + case QEMU_OPTION_maxcpus: > + max_cpus = atoi(optarg); > + if ((max_cpus < 1) || (max_cpus > machine->max_cpus)) { > + fprintf(stderr, "Invalid number of CPUs\n"); > + exit(1); > + } > + break; > case QEMU_OPTION_vnc: > display_type = DT_VNC; > vnc_display = optarg; This implies the limit (for x86 pc machine at least) is now 255. Is that the correct interpretation on my part ? Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|