From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOXvn-0000ba-0E for qemu-devel@nongnu.org; Fri, 14 Mar 2014 15:38:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOXvh-000696-08 for qemu-devel@nongnu.org; Fri, 14 Mar 2014 15:38:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOXvg-000690-Nq for qemu-devel@nongnu.org; Fri, 14 Mar 2014 15:38:04 -0400 Message-ID: <53235A99.70109@redhat.com> Date: Fri, 14 Mar 2014 20:38:01 +0100 From: Laszlo Ersek MIME-Version: 1.0 References: <1394823137-4369-1-git-send-email-ehabkost@redhat.com> <1394823137-4369-8-git-send-email-ehabkost@redhat.com> <53235476.4040305@redhat.com> <20140314193050.GF29227@otherpad.lan.raisama.net> In-Reply-To: <20140314193050.GF29227@otherpad.lan.raisama.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 7/7] vl.c: Use MAX_CPUS macro instead of hardcoded constant List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Igor Mammedov , "Michael S. Tsirkin" , qemu-devel@nongnu.org, =?ISO-8859-1?Q?Andreas_F=E4rber?= On 03/14/14 20:30, Eduardo Habkost wrote: > On Fri, Mar 14, 2014 at 08:11:50PM +0100, Laszlo Ersek wrote: >> On 03/14/14 19:52, Eduardo Habkost wrote: >>> Signed-off-by: Eduardo Habkost >>> --- >>> vl.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/vl.c b/vl.c >>> index 64b38a5..62cc734 100644 >>> --- a/vl.c >>> +++ b/vl.c >>> @@ -1413,7 +1413,7 @@ static void smp_parse(QemuOpts *opts) >>> max_cpus = smp_cpus; >>> } >>> >>> - if (max_cpus > 255) { >>> + if (max_cpus > MAX_CPUS) { >>> fprintf(stderr, "Unsupported number of maxcpus\n"); >>> exit(1); >>> } >>> >> >> $ git grep -e '255' --and -e cpus >> >> hw/s390x/s390-virtio-ccw.c: .max_cpus = 255, >> hw/s390x/s390-virtio.c: .max_cpus = 255, >> include/hw/i386/pc.h: .max_cpus = 255 >> vl.c: if (max_cpus > 255) { >> >> I propose to fix those other tree occurrences as well. (I could be >> easily wrong of course!, I didn't investigate.) > > We first need to find out the reason behind those machine-specific > limits. Maybe they can be removed (if they are all because of NUMA > and/or ACPI), or maybe they need to use another macro because there are > other limits in machine-specific code. OK. Until then: Reviewed-by: Laszlo Ersek