From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmVHN-0006kc-Ja for qemu-devel@nongnu.org; Thu, 06 Nov 2014 17:11:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmVHE-0006Y7-J7 for qemu-devel@nongnu.org; Thu, 06 Nov 2014 17:11:45 -0500 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:33213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmVHE-0006Wo-Bt for qemu-devel@nongnu.org; Thu, 06 Nov 2014 17:11:36 -0500 Received: by mail-wi0-f176.google.com with SMTP id h11so2886682wiw.9 for ; Thu, 06 Nov 2014 14:11:35 -0800 (PST) Sender: Paolo Bonzini Message-ID: <545BF212.2090404@redhat.com> Date: Thu, 06 Nov 2014 23:11:30 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1415290175-17314-1-git-send-email-drjones@redhat.com> In-Reply-To: <1415290175-17314-1-git-send-email-drjones@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] vl: rework smp_parse List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Jones , qemu-devel@nongnu.org Cc: ehabkost@redhat.com 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? Paolo