Skip to contentSkip to conversation

kvm: Add documentation for KVM_CAP_NR_VCPUS

PATCH Superseded Pekka Enberg 2 participants 2 messages May 7, 2011 – May 9, 2011

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm: Add documentation for KVM_CAP_NR_VCPUS

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 <[email protected]>
Cc Marcelo Tosatti <[email protected]>
Cc Jan Kiszka <[email protected]>
---
 Documentation/kvm/api.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Documentation/kvm/api.txt +2 -1
index 9bef4e4..54d603f 100644
@@ -175,7 +175,8 @@ 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.
 
 4.8 KVM_GET_DIRTY_LOG (vm ioctl)
 
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 3 lines · Pekka Enberg

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.

This capability was added in 2.6.26; so the documentation should state that if the capability is not available the user should assume 4 cpus max (the limit at the time).

Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.