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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2012/7/31 Peter Maydell <peter.maydell@xxxxxxxxxx>:
> On 31 July 2012 11:14,  <riegamaths@xxxxxxxxx> 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).
>
Thanks for your review.
I agree with you, I should use "goto err" like other checks.
> -- PMM



-- 
Best Regards,

Dunrong Huang
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux