public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] target-i386: Improve x86_cpu_list output
@ 2013-02-23 15:45 Jan Kiszka
  2013-02-26 20:14 ` Eduardo Habkost
  2013-02-26 21:57 ` Igor Mammedov
  0 siblings, 2 replies; 8+ messages in thread
From: Jan Kiszka @ 2013-02-23 15:45 UTC (permalink / raw)
  To: Anthony Liguori
  Cc: qemu-devel, Eduardo Habkost, Igor Mammedov, Andreas Färber,
	kvm

[-- Attachment #1: Type: text/plain, Size: 1910 bytes --]

From: Jan Kiszka <jan.kiszka@siemens.com>

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 <jan.kiszka@siemens.com>
---
 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)
-- 
1.7.3.4


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-27  8:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-23 15:45 [PATCH] target-i386: Improve x86_cpu_list output Jan Kiszka
2013-02-26 20:14 ` Eduardo Habkost
2013-02-26 21:57 ` Igor Mammedov
2013-02-27  3:26   ` Eduardo Habkost
2013-02-27  7:37     ` Igor Mammedov
2013-02-27  7:52       ` Jan Kiszka
2013-02-27  7:59         ` Andreas Färber
2013-02-27  8:35         ` Igor Mammedov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox