Re: [PATCH] kvm tools: Limit CPU count by KVM_CAP_NR_VCPUS

2011-05-07 Thread Ingo Molnar
* Pekka Enberg wrote: > +int kvm__max_cpus(struct kvm *self) > +{ > + int ret; > + > + ret = ioctl(self->sys_fd, KVM_CHECK_EXTENSION, KVM_CAP_NR_VCPUS); > + if (ret < 0) > + die_perror("KVM_CAP_NR_VCPUS"); > + > + return ret; > +} I double checked, and KVM_CAP_NR_VCP

[PATCH] kvm tools: Limit CPU count by KVM_CAP_NR_VCPUS

2011-05-07 Thread Pekka Enberg
This patch limits the number of CPUs to KVM_CAP_NR_VCPUS when user specifies more CPUs with the "--cpus=N" command line option than what the in-kernel KVM is able to handle. Cc: Asias He Cc: Cyrill Gorcunov Cc: Ingo Molnar Cc: Prasad Joshi Cc: Sasha Levin Signed-off-by: Pekka Enberg --- too