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

2012-07-31 Thread Peter Maydell
On 30 July 2012 19:22, wrote: > +static int kvm_max_vcpus(KVMState *s) > +{ > +int max_vcpus = 4; > +int ret; > +ret = kvm_check_extension(s, KVM_CAP_MAX_VCPUS); > +if (ret) { > +max_vcpus = ret; > +} else { > + ret = kvm_check_extension(s, KVM_CAP_NR_VCPUS); > +

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

2012-07-31 Thread Stefan Hajnoczi
On Mon, Jul 30, 2012 at 7:22 PM, wrote: > 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 > --- >

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

2012-07-30 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 --- kvm-all.c | 25 + 1 files chang