From patchwork Sat Feb 23 15:45:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 222734 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 78B612C02AC for ; Sun, 24 Feb 2013 02:46:18 +1100 (EST) Received: from localhost ([::1]:45643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9HIm-0000zy-Mz for incoming@patchwork.ozlabs.org; Sat, 23 Feb 2013 10:46:16 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9HIZ-0000yB-WB for qemu-devel@nongnu.org; Sat, 23 Feb 2013 10:46:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9HIU-00083z-1g for qemu-devel@nongnu.org; Sat, 23 Feb 2013 10:46:03 -0500 Received: from mout.web.de ([212.227.15.3]:63436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9HIT-00083t-Ol for qemu-devel@nongnu.org; Sat, 23 Feb 2013 10:45:57 -0500 Received: from mchn199C.mchp.siemens.de ([95.157.56.37]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0LwYtb-1UvBWU31nr-017e2n; Sat, 23 Feb 2013 16:45:02 +0100 Message-ID: <5128E3FC.8010206@web.de> Date: Sat, 23 Feb 2013 16:45:00 +0100 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Anthony Liguori X-Enigmail-Version: 1.5 X-Provags-ID: V02:K0:pcsxLZywRF38/XEy/5tip79f9No1qR4fkQmyhqV778O tvxTAySWNIcMrXv0By+SVYTwqfmFOPXJkCaWKfiCK1JmLKXgc+ R9oozDN5S/d1G0dOojuniuGzHIWvo5DxE1L0tUDKKr4TXNs5b+ BRRdDEBcVspP05NbNH5NMBfZY5UGCX3qXELT8J223AF0vhc+U2 A0ylIBIRSiTv2RjaRVIZQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.3 Cc: Igor Mammedov , kvm , qemu-devel , =?ISO-8859-1?Q?Andreas_F=E4rber?= , Eduardo Habkost Subject: [Qemu-devel] [PATCH] target-i386: Improve x86_cpu_list output X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jan Kiszka Several issues fixed: - We were missing a bunch of feature lists. Fix this by simply dumping the meta list feature_word_info. - kvm_enabled() cannot be true at this point because accelerators are initialized much later during init. Simply dump unconditionally. - Add explanation for "host" CPU type. Signed-off-by: Jan Kiszka Reviewed-by: Eduardo Habkost --- target-i386/cpu.c | 20 +++++++++----------- 1 files changed, 9 insertions(+), 11 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index dfcf86e..6e742f0 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1453,18 +1453,16 @@ void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf) snprintf(buf, sizeof(buf), "%s", def->name); (*cpu_fprintf)(f, "x86 %16s %-48s\n", buf, def->model_id); } - if (kvm_enabled()) { - (*cpu_fprintf)(f, "x86 %16s\n", "[host]"); - } + (*cpu_fprintf)(f, "x86 %16s %-48s\n", "host", + "KVM processor with all supported host features"); + (*cpu_fprintf)(f, "\nRecognized CPUID flags:\n"); - listflags(buf, sizeof(buf), (uint32_t)~0, feature_name, 1); - (*cpu_fprintf)(f, " %s\n", buf); - listflags(buf, sizeof(buf), (uint32_t)~0, ext_feature_name, 1); - (*cpu_fprintf)(f, " %s\n", buf); - listflags(buf, sizeof(buf), (uint32_t)~0, ext2_feature_name, 1); - (*cpu_fprintf)(f, " %s\n", buf); - listflags(buf, sizeof(buf), (uint32_t)~0, ext3_feature_name, 1); - (*cpu_fprintf)(f, " %s\n", buf); + for (i = 0; i < ARRAY_SIZE(feature_word_info); i++) { + FeatureWordInfo *fw = &feature_word_info[i]; + + listflags(buf, sizeof(buf), (uint32_t)~0, fw->feat_names, 1); + (*cpu_fprintf)(f, " %s\n", buf); + } } CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp)