kvm: warn if num cpus is greater than num recommended
commit670436ced08738802e15764039d03ab0dbab2bf3
authorAndrew Jones <drjones@redhat.com>
Fri, 23 Aug 2013 13:24:37 +0000 (23 15:24 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 20 Sep 2013 10:37:52 +0000 (20 12:37 +0200)
treebfac151f632c85b3f787f7a9748c0a1f7af123ad
parent97577fd4c31777780a22b77afa4590086ac962c7
kvm: warn if num cpus is greater than num recommended

The comment in kvm_max_vcpus() states that it's using the recommended
procedure from the kernel API documentation to get the max number
of vcpus that kvm supports. It is, but by always returning the
maximum number supported. The maximum number should only be used
for development purposes. qemu should check KVM_CAP_NR_VCPUS for
the recommended number of vcpus. This patch adds a warning if a user
specifies a number of cpus between the recommended and max.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
kvm-all.c