From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrAib-0005Ba-UI for qemu-devel@nongnu.org; Thu, 12 Dec 2013 13:10:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VrAiT-0005jJ-AS for qemu-devel@nongnu.org; Thu, 12 Dec 2013 13:10:37 -0500 Received: from mail-pb0-x235.google.com ([2607:f8b0:400e:c01::235]:53775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrAiT-0005iR-2n for qemu-devel@nongnu.org; Thu, 12 Dec 2013 13:10:29 -0500 Received: by mail-pb0-f53.google.com with SMTP id ma3so945766pbc.26 for ; Thu, 12 Dec 2013 10:10:26 -0800 (PST) Message-ID: <52A9FC0C.3040509@gmail.com> Date: Fri, 13 Dec 2013 02:10:20 +0800 From: lijun MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] qemu will core dump with "-smp 254, sockets=2, cores=3, threads=2" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, kraxel@redhat.com, mst@redhat.com Hi all, when set "-smp" more than 160, qemu will give the following warning: Warning: Number of SMP cpus requested (161) exceeds the recommended cpus supported by KVM (160) As the above warning, when set "-smp 160,sockets=2,cores=3,threads=2", but find that apic_id(hw/i386/acpi-build.c) is 259 not 159 and id(hw/acpi/piix4.c) is 259 not 159. As the above warning, when set "-smp 254,sockets=2,cores=3,threads=2", but find that apic_id(hw/i386/acpi-build.c) is 513 not 253 and id(hw/acpi/piix4.c) is 513 not 253. Based on above reasons, we have two methods to fix this issue. 1, Delete "assert(apic_id <= MAX_CPUMASK_BITS)" in file "hw/i386/acpi-build.c" and delete "g_assert((id / 8) < PIIX4_PROC_LEN)" in file "hw/acpi/piix4.c". 2, Detect the values of "sockets,cores,threads" when get them from command line. And modify smp_parse function in file vl.c to do some restrictions on these parameters when boot qemu. I will submit the code patch later. Best Regards, Jun Li