From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH] target-i386: Improve x86_cpu_list output Date: Sat, 23 Feb 2013 16:45:00 +0100 Message-ID: <5128E3FC.8010206@web.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2OQLFWAFTAHSPBRTMCSFT" Cc: qemu-devel , Eduardo Habkost , Igor Mammedov , =?ISO-8859-1?Q?Andreas_F=E4rber?= , kvm To: Anthony Liguori Return-path: 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 Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2OQLFWAFTAHSPBRTMCSFT Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 --- 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_f= printf) 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 =3D 0; i < ARRAY_SIZE(feature_word_info); i++) { + FeatureWordInfo *fw =3D &feature_word_info[i]; + + listflags(buf, sizeof(buf), (uint32_t)~0, fw->feat_names, 1); + (*cpu_fprintf)(f, " %s\n", buf); + } } =20 CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp) --=20 1.7.3.4 ------enig2OQLFWAFTAHSPBRTMCSFT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlEo4/wACgkQitSsb3rl5xQ66wCeImB+4veHHUJCnZuERrPXbRJ2 YKcAoI1J5Wdl9cwZCYx2MCikRZ2w20tf =CXjz -----END PGP SIGNATURE----- ------enig2OQLFWAFTAHSPBRTMCSFT--