Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ms44h-0007fE-Dn for qemu-devel@nongnu.org; Sun, 27 Sep 2009 20:26:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ms44c-0007eu-3t for qemu-devel@nongnu.org; Sun, 27 Sep 2009 20:26:42 -0400 Received: from [199.232.76.173] (port=33460 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ms44b-0007er-Vl for qemu-devel@nongnu.org; Sun, 27 Sep 2009 20:26:37 -0400 Received: from smarthost.c4l.co.uk ([82.197.83.77]:60822) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ms44b-0002o7-JY for qemu-devel@nongnu.org; Sun, 27 Sep 2009 20:26:37 -0400 Received: from [93.97.162.229] (helo=mx.parenthephobia.org.uk) by smarthost.c4l.co.uk with esmtp (Exim 4.69) (envelope-from ) id 1Ms454-0001G1-7t for qemu-devel@nongnu.org; Mon, 28 Sep 2009 01:27:06 +0100 Received: from [IPv6:2001:9d8:fade:0:221:97ff:fe9c:5fa4] (unknown [IPv6:2001:9d8:fade:0:221:97ff:fe9c:5fa4]) (Authenticated sender: nathan) by mx.parenthephobia.org.uk (Postfix) with ESMTPA id 6492C5313E for ; Mon, 28 Sep 2009 01:26:26 +0100 (BST) From: Nathan Baum Content-Type: text/plain Date: Mon, 28 Sep 2009 01:26:24 +0100 Message-Id: <1254097584.7387.12.camel@athens.parenthephobia.org.uk> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] x86: Show model_id in CPU list. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Shows the model_id in the CPU list: $ qemu-system-x86_64 -cpu ? x86 qemu64 QEMU Virtual CPU version 0.11.50 x86 phenom AMD Phenom(tm) 9550 Quad-Core Processor x86 core2duo Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz x86 kvm64 Common KVM processor x86 qemu32 QEMU Virtual CPU version 0.11.50 x86 coreduo Genuine Intel(R) CPU T2600 @ 2.16GHz x86 486 x86 pentium x86 pentium2 x86 pentium3 x86 athlon QEMU Virtual CPU version 0.11.50 x86 n270 Intel(R) Atom(TM) CPU N270 @ 1.60GHz No particular reason for it; just thought it could be considered useful. As an aside, is it intentional that "athlon"'s model_id describes it as a generic Qemu CPU? Signed-off-by: Nathan Baum --- diff --git a/target-i386/helper.c b/target-i386/helper.c index 8111f25..57eed1a 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -495,8 +495,14 @@ void x86_cpu_list (FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)) { unsigned int i; - for (i = 0; i < ARRAY_SIZE(x86_defs); i++) - (*cpu_fprintf)(f, "x86 %16s\n", x86_defs[i].name); + for (i = 0; i < ARRAY_SIZE(x86_defs); i++) { + if (x86_defs[i].model_id) { + (*cpu_fprintf)(f, "x86 %16s %s\n", x86_defs[i].name, + x86_defs[i].model_id); + } else { + (*cpu_fprintf)(f, "x86 %16s\n", x86_defs[i].name); + } + } } static int cpu_x86_register (CPUX86State *env, const char *cpu_model)