kvm tools: Correctly limit nrcpus to max_cpus

Fix a typo where kvm->nrcpus was set, then immediately overwritten with
older value.

Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
Matt Evans
2015-06-01 16:39:49 +01:00
committed by Will Deacon
parent f19edd1e98
commit 90c0518814
+1 -1
View File
@@ -817,7 +817,7 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix)
if (nrcpus > max_cpus) {
printf(" # Limit the number of CPUs to %d\n", max_cpus);
kvm->nrcpus = max_cpus;
nrcpus = max_cpus;
} else if (nrcpus > recommended_cpus) {
printf(" # Warning: The maximum recommended amount of VCPUs"
" is %d\n", recommended_cpus);