[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] kvm: Check if smp_cpus exceeds max cpus supp
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2] kvm: Check if smp_cpus exceeds max cpus supported by kvm |
Date: |
Tue, 31 Jul 2012 11:20:45 +0100 |
On 31 July 2012 11:14, <address@hidden> 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 (%d)\n", smp_cpus, max_vcpus);
> + exit(1);
Don't exit here, just use 'goto err' like all the other checks in
this function. The caller will handle this and exit (or downgrade
to TCG if the user wanted that).
-- PMM