qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] vl: verify if combination of cpus, sockets, cor


From: Peter Lieven
Subject: Re: [Qemu-devel] [PATCH] vl: verify if combination of cpus, sockets, cores and threads is sane
Date: Fri, 22 Nov 2013 12:13:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

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

[Prev in Thread] Current Thread [Next in Thread]