On 22.11.2013 11:16, Paolo Bonzini wrote:
Il 21/11/2013 15:37, Peter Lieven ha scritto:
-        max_cpus = qemu_opt_get_number(opts, "maxcpus", 0);
+        if (cpus != sockets * cores * threads) {
+            fprintf(stderr, "Illegal CPU layout: %d cpus with %d sockets,"
+                            " %d cores per socket and %d threads per core"
+                            " (cpus != sockets * cores * threads)\n",
+                            cpus, sockets, cores, threads);
+            exit(1);
+        }
Should max_cpus be checked instead if non-zero?

I see where you come from, but I think the potential for this patch to
break some working configuration (for some definition of working) is too
high.  Can you split out the fixes to the "fill in the blanks" logic?
I can, but the number of sockets is logal to the parse function.

What would you think is it okay to just send a warning about
the illegal config and drop the exit(1).

Peter

Reply via email to