Received: from eggs.gnu.org ([2001:4830:134:3::10]:45964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnWxA-0000eE-Ve for qemu-devel@nongnu.org; Mon, 02 Dec 2013 12:06:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnWx4-0002fB-8e for qemu-devel@nongnu.org; Mon, 02 Dec 2013 12:06:36 -0500 Message-ID: <529CBE15.8010206@msgid.tls.msk.ru> Date: Mon, 02 Dec 2013 21:06:29 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1385350750-21468-1-git-send-email-aik@ozlabs.ru> In-Reply-To: <1385350750-21468-1-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] vl: remove (max_cpus > 255) check from smp_parse List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org 25.11.2013 07:39, Alexey Kardashevskiy wrote: > Since modern POWER7/POWER8 chips can have more that 256 CPU threads > (>2000 actually), remove this check from smp_parse. > > The CPUs number is still checked against machine->max_cpus and this check > should be enough not to break other archs. [] > - if (max_cpus > 255) { > - fprintf(stderr, "Unsupported number of maxcpus\n"); > - exit(1); > - } I don't know whenever this is actually safe. Do we have any static arrays of size 255 somewhere, which will be overflowed without this check? :) Thanks, /mjt