Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mls43-0004gF-IF for qemu-devel@nongnu.org; Thu, 10 Sep 2009 18:24:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mls3u-0004Yw-DE for qemu-devel@nongnu.org; Thu, 10 Sep 2009 18:24:22 -0400 Received: from [199.232.76.173] (port=40035 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mls3t-0004Yf-Ks for qemu-devel@nongnu.org; Thu, 10 Sep 2009 18:24:17 -0400 Received: from tx2ehsobe005.messaging.microsoft.com ([65.55.88.15]:2689 helo=TX2EHSOBE009.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1Mls3t-0001KQ-2M for qemu-devel@nongnu.org; Thu, 10 Sep 2009 18:24:17 -0400 Received: from mail139-tx2 (localhost.localdomain [127.0.0.1]) by mail139-tx2-R.bigfish.com (Postfix) with ESMTP id D39FAC70454 for ; Thu, 10 Sep 2009 22:24:15 +0000 (UTC) Received: from TX2EHSMHS001.bigfish.com (unknown [10.9.14.242]) by mail139-tx2.bigfish.com (Postfix) with ESMTP id AAD62A78050 for ; Thu, 10 Sep 2009 22:24:14 +0000 (UTC) Received: from ausb3twp02.amd.com ([163.181.250.38]) by ausb3extmailp01.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id n8AMO8mU020723 for ; Thu, 10 Sep 2009 17:24:11 -0500 Received: from sausexbh2.amd.com (SAUSEXBH2.amd.com [163.181.22.102]) by ausb3twp02.amd.com (Tumbleweed MailGate 3.7.0) with ESMTP id 2B5E5C850F for ; Thu, 10 Sep 2009 17:24:06 -0500 (CDT) From: Andre Przywara Date: Fri, 11 Sep 2009 00:20:52 +0200 Message-ID: <1252621257-26364-8-git-send-email-andre.przywara@amd.com> In-Reply-To: <1252621257-26364-1-git-send-email-andre.przywara@amd.com> References: <1252621257-26364-1-git-send-email-andre.przywara@amd.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH 07/12] cpuid: list all known x86 CPUID feature flags List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Andre Przywara -cpu ? currently gives us a list of known CPU models. Add a list of known CPUID feature flags to the output. Signed-off-by: Andre Przywara --- target-i386/cpuid.c | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index ab3565e..e62dc04 100644 --- a/target-i386/cpuid.c +++ b/target-i386/cpuid.c @@ -543,10 +543,27 @@ error: void x86_cpu_list (FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)) { - unsigned int i; + unsigned int i, j; + const char **stringlist[] = {feature_name, ext_feature_name, + ext2_feature_name, ext3_feature_name}; for (i = 0; i < ARRAY_SIZE(x86_defs); i++) (*cpu_fprintf)(f, "x86 %16s\n", x86_defs[i].name); + + (*cpu_fprintf)(f, "x86 recognized feature flags:\n "); + for (j = 0; j < 4; j++) { + for (i = 0; i < 32; i++) { + if (j == 2 && ((1 << i) & EXT2_FEATURE_MASK)) + continue; + if (stringlist[j][i] == NULL) + continue; + (*cpu_fprintf)(f, "%s ", stringlist[j][i]); + if (i == 15) + (*cpu_fprintf)(f, "\n "); + } + (*cpu_fprintf)(f, "\n "); + } + return; } int cpu_x86_register (CPUX86State *env, const char *cpu_model) -- 1.6.1.3