Re: [Qemu-devel] [PATCH v2] kvm: Check if smp_cpus exceeds max cpus supported by kvm

2012-07-31 Thread Dunrong Huang
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 >

Re: [Qemu-devel] [PATCH v2] kvm: Check if smp_cpus exceeds max cpus supported by kvm

2012-07-31 Thread 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 " > +"supported by KVM

[PATCH v2] kvm: Check if smp_cpus exceeds max cpus supported by kvm

2012-07-31 Thread riegamaths
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 +