]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
KVM: Add documentation for KVM_CAP_NR_VCPUS
authorPekka Enberg <penberg@kernel.org>
Mon, 9 May 2011 19:48:54 +0000 (22:48 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 22 May 2011 12:48:11 +0000 (08:48 -0400)
Document KVM_CAP_NR_VCPUS that can be used by the userspace to determine
maximum number of VCPUs it can create with the KVM_CREATE_VCPU ioctl.

Cc: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
Documentation/kvm/api.txt

index f64c41f8ba61746d2bad6b15ee6f01d319a84b18..42542eb802ca16127d3338ebbd60c9f4efe37d41 100644 (file)
@@ -175,7 +175,10 @@ 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).
+in the range [0, max_vcpus).  You can use KVM_CAP_NR_VCPUS of the
+KVM_CHECK_EXTENSION ioctl() to determine the value for max_vcpus at run-time.
+If the KVM_CAP_NR_VCPUS does not exist, you should assume that max_vcpus is 4
+cpus max.
 
 4.8 KVM_GET_DIRTY_LOG (vm ioctl)