kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kvm: Add documentation for KVM_CAP_NR_VCPUS
@ 2011-05-07 14:42 Pekka Enberg
  2011-05-09  8:21 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Pekka Enberg @ 2011-05-07 14:42 UTC (permalink / raw)
  To: kvm; +Cc: Pekka Enberg, Avi Kivity, Marcelo Tosatti, Jan Kiszka

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>
---
 Documentation/kvm/api.txt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
index 9bef4e4..54d603f 100644
--- a/Documentation/kvm/api.txt
+++ b/Documentation/kvm/api.txt
@@ -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)
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kvm: Add documentation for KVM_CAP_NR_VCPUS
  2011-05-07 14:42 [PATCH] kvm: Add documentation for KVM_CAP_NR_VCPUS Pekka Enberg
@ 2011-05-09  8:21 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2011-05-09  8:21 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: kvm, Marcelo Tosatti, Jan Kiszka

On 05/07/2011 05:42 PM, Pekka Enberg wrote:
> 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).

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-09  8:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-07 14:42 [PATCH] kvm: Add documentation for KVM_CAP_NR_VCPUS Pekka Enberg
2011-05-09  8:21 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).