[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/3] vl: warn on topology <-> maxcpus mismatch
From: |
Andrew Jones |
Subject: |
[Qemu-devel] [PATCH 3/3] vl: warn on topology <-> maxcpus mismatch |
Date: |
Fri, 7 Nov 2014 17:04:40 +0100 |
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 <address@hidden>
---
vl.c | 7 +++++++
1 file changed, 7 insertions(+)
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;
--
1.9.3
- [Qemu-devel] [PATCH 1/3] vl: fix max_cpus check, (continued)
[Qemu-devel] [PATCH 3/3] vl: warn on topology <-> maxcpus mismatch,
Andrew Jones <=
Re: [Qemu-devel] [PATCH 0/3] vl: smp_parse sanity checks, Paolo Bonzini, 2014/11/11