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: 2178511 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id CC396DF25A for ; Sat, 23 Feb 2013 15:46:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759243Ab3BWPp4 (ORCPT ); Sat, 23 Feb 2013 10:45:56 -0500 Received: from mout.web.de ([212.227.15.3]:49728 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758968Ab3BWPp4 (ORCPT ); Sat, 23 Feb 2013 10:45:56 -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 CC: qemu-devel , Eduardo Habkost , Igor Mammedov , =?ISO-8859-1?Q?Andreas_F=E4rber?= , kvm Subject: [PATCH] target-i386: Improve x86_cpu_list output X-Enigmail-Version: 1.5 X-Provags-ID: V02:K0:pcsxLZywRF38/XEy/5tip79f9No1qR4fkQmyhqV778O tvxTAySWNIcMrXv0By+SVYTwqfmFOPXJkCaWKfiCK1JmLKXgc+ R9oozDN5S/d1G0dOojuniuGzHIWvo5DxE1L0tUDKKr4TXNs5b+ BRRdDEBcVspP05NbNH5NMBfZY5UGCX3qXELT8J223AF0vhc+U2 A0ylIBIRSiTv2RjaRVIZQ== Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.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)