On Thu, Nov 06, 2014 at 11:11:30PM +0100, Paolo Bonzini wrote: > > > On 06/11/2014 17:09, Andrew Jones wrote: > > + if (sockets * cores * threads != max_cpus) { > > + fprintf(stderr, "cpu topology: " > > + "sockets (%u) * cores (%u) * threads (%u) != max_cpus > > (%u)\n", > > + sockets, cores, threads, max_cpus); > > + exit(1); > > + } > > I think this would cause too many failures in the wild. Perhaps error > out if it is lower, and warn if sockets * cores * threads > max_cpus > since we actually allow hot-plug a thread at a time?
We'd still have more failures if we choose to error out when it's lower, since we currently silently adjust threads in some of those cases, or just don't care that the topology doesn't support up to maxcpus in other. I'm not sure how best to go about modifying the command line semantics in a backwards compatible way, other than to just create a new "-smp" option. I'm open to all opinions and suggestions. Thanks, drew