From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pekka Enberg Subject: Re: KVM_CREATE_VCPU max vcpu ABI Date: Sat, 07 May 2011 17:48:19 +0300 Message-ID: <1304779699.10621.12.camel@jaguar> References: <4DC52919.2040100@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: Avi Kivity , KVM General , Ingo Molnar , Asias He , Cyrill Gorcunov , Sasha Levin To: Jan Kiszka Return-path: Received: from filtteri2.pp.htv.fi ([213.243.153.185]:59805 "EHLO filtteri2.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755289Ab1EGOsV (ORCPT ); Sat, 7 May 2011 10:48:21 -0400 In-Reply-To: <4DC52919.2040100@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Sat, 2011-05-07 at 13:12 +0200, Jan Kiszka wrote: > On 2011-05-07 12:16, Pekka Enberg wrote: > > Hi! > > > > Documentation/kvm/api.txt says the following: > > > > 4.6 KVM_CREATE_VCPU > > > > Capability: basic > > Architectures: all > > Type: vm ioctl > > Parameters: vcpu id (apic id on x86) > > Returns: vcpu fd on success, -1 on error > > > > This API adds a vcpu to a virtual machine. The vcpu id is a small integer > > in the range [0, max_vcpus). > > > > However, max_vcpus is not specified and I am unable to find ioctl() > > which I could use to look it up. Is it specified somewhere? We can, of > > course, attempt to create as many VCPUs as possible until > > KVM_CREATE_VCPU returns EINVAL... > > Querying for KVM_CAP_NR_VCPUS returns this number (documented in the kvm > header). Want to file a patch for adding a hint to the section above? Done. Thanks Jan!