From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xm8Ws-0003n3-Jo for qemu-devel@nongnu.org; Wed, 05 Nov 2014 16:54:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xm8Wm-00073g-BM for qemu-devel@nongnu.org; Wed, 05 Nov 2014 16:54:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xm8Wm-00072g-2K for qemu-devel@nongnu.org; Wed, 05 Nov 2014 16:54:08 -0500 From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Date: Wed, 5 Nov 2014 22:53:30 +0100 Message-Id: <1415224413-13972-1-git-send-email-rkrcmar@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 0/3] Improve error message on invalid CPU topologies List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson , Eduardo Habkost , =?UTF-8?q?Andreas=20F=C3=A4rber?= A not-a-bug reported that QEMU fails when cores=3D6,maxcpus=3D240, https://bugzilla.redhat.com/show_bug.cgi?id=3D1159264 The error message is qemu-kvm: max_cpus is too large. APIC ID of last CPU is 317 Misconfiguration, but how large can maxcpus be? There probably aren't many QEMU users with knowledge about initial APIC I= D assignment, so it would be better to prevent confusion by making the erro= r message more accessible. Especially since big VMs are spreading. Output after this patch is qemu-kvm: invalid CPU topology: maxcpus can't exceed 192 if cores=3D6 a= nd threads=3D1 Looking for better wording ... (The main problem of this series is benefit/code ratio.) Radim Kr=C4=8Dm=C3=A1=C5=99 (3): target-i386: add apicid_pkg_width to topology.h target-i386: introduce x86_cpu_nr_apic_ids pc: improve error message with impossible max_cpus hw/i386/pc.c | 12 +++++++----- target-i386/cpu.c | 16 ++++++++++++++++ target-i386/cpu.h | 1 + target-i386/topology.h | 13 +++++++++++++ tests/test-x86-cpuid.c | 9 +++++++++ 5 files changed, 46 insertions(+), 5 deletions(-) --=20 2.1.0