2012/7/31 Peter Maydell :
> On 31 July 2012 11:14, wrote:
>>
>> @@ -1256,6 +1274,13 @@ int kvm_init(void)
>> goto err;
>> }
>>
>> +max_vcpus = kvm_max_vcpus(s);
>> +if (smp_cpus > max_vcpus) {
>> +fprintf(stderr, "Number of SMP cpus requested (%d) exceeds max cpus
>
On 31 July 2012 11:14, wrote:
>
> @@ -1256,6 +1274,13 @@ int kvm_init(void)
> goto err;
> }
>
> +max_vcpus = kvm_max_vcpus(s);
> +if (smp_cpus > max_vcpus) {
> +fprintf(stderr, "Number of SMP cpus requested (%d) exceeds max cpus "
> +"supported by KVM
From: Dunrong Huang
Add a helper function for fetching max cpus supported by kvm.
Make QEMU exit with an error message if smp_cpus exceeds limit
of VCPU count retrieved by invoking this helper function.
Signed-off-by: Dunrong Huang
---
v1 -> v2:
* Fix indentation
kvm-all.c | 25 +