Message ID | 1415376280-14130-4-git-send-email-drjones@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/vl.c b/vl.c index c62fe29aa8075..72ffbffd858c5 100644 --- a/vl.c +++ b/vl.c @@ -1313,6 +1313,13 @@ static void smp_parse(QemuOpts *opts) } max_cpus = qemu_opt_get_number(opts, "maxcpus", 0); + max_cpus = max_cpus ?: cpus; + + if (sockets * cores * threads != max_cpus) { + fprintf(stderr, "cpu topology: warning: " + "sockets (%u) * cores (%u) * threads (%u) != max_cpus (%u)\n", + sockets, cores, threads, max_cpus); + } smp_cpus = cpus; smp_cores = cores;
Start guiding users towards making sure their topology supports the maximum number of cpus they wish to support. A future patch series will enforce this for new machine types. Signed-off-by: Andrew Jones <drjones@redhat.com> --- vl.c | 7 +++++++ 1 file changed, 7 insertions(+)