KVM: x86: Raise the hard VCPU count limit
The patch raises the hard limit of VCPU count to 254. This will allow developers to easily work on scalability and will allow users to test high VCPU setups easily without patching the kernel. To prevent possible issues with current setups, KVM_CAP_NR_VCPUS now returns the recommended VCPU limit (which is still 64) - this should be a safe value for everybody, while a new KVM_CAP_MAX_VCPUS returns the hard limit which is now 254. Cc: Avi Kivity <avi@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Pekka Enberg <penberg@kernel.org> Suggested-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
@ -175,10 +175,17 @@ 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). You can use KVM_CAP_NR_VCPUS of the
|
||||
KVM_CHECK_EXTENSION ioctl() to determine the value for max_vcpus at run-time.
|
||||
in the range [0, max_vcpus).
|
||||
|
||||
The recommended max_vcpus value can be retrieved using the KVM_CAP_NR_VCPUS of
|
||||
the KVM_CHECK_EXTENSION ioctl() at run-time.
|
||||
The maximum possible value for max_vcpus can be retrieved using the
|
||||
KVM_CAP_MAX_VCPUS of the KVM_CHECK_EXTENSION ioctl() at run-time.
|
||||
|
||||
If the KVM_CAP_NR_VCPUS does not exist, you should assume that max_vcpus is 4
|
||||
cpus max.
|
||||
If the KVM_CAP_MAX_VCPUS does not exist, you should assume that max_vcpus is
|
||||
same as the value returned from KVM_CAP_NR_VCPUS.
|
||||
|
||||
On powerpc using book3s_hv mode, the vcpus are mapped onto virtual
|
||||
threads in one or more virtual CPU cores. (This is because the
|
||||
|
Reference in New Issue
Block a user