[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] x86: Show model_id in CPU list.
From: |
Nathan Baum |
Subject: |
[Qemu-devel] [PATCH] x86: Show model_id in CPU list. |
Date: |
Mon, 28 Sep 2009 01:26:24 +0100 |
Shows the model_id in the CPU list:
$ qemu-system-x86_64 -cpu ?
x86 qemu64 QEMU Virtual CPU version 0.11.50
x86 phenom AMD Phenom(tm) 9550 Quad-Core Processor
x86 core2duo Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz
x86 kvm64 Common KVM processor
x86 qemu32 QEMU Virtual CPU version 0.11.50
x86 coreduo Genuine Intel(R) CPU T2600 @ 2.16GHz
x86 486
x86 pentium
x86 pentium2
x86 pentium3
x86 athlon QEMU Virtual CPU version 0.11.50
x86 n270 Intel(R) Atom(TM) CPU N270 @ 1.60GHz
No particular reason for it; just thought it could be considered useful.
As an aside, is it intentional that "athlon"'s model_id describes it as
a generic Qemu CPU?
Signed-off-by: Nathan Baum <address@hidden>
---
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 8111f25..57eed1a 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -495,8 +495,14 @@ void x86_cpu_list (FILE *f, int (*cpu_fprintf)(FILE
*f, const char *fmt, ...))
{
unsigned int i;
- for (i = 0; i < ARRAY_SIZE(x86_defs); i++)
- (*cpu_fprintf)(f, "x86 %16s\n", x86_defs[i].name);
+ for (i = 0; i < ARRAY_SIZE(x86_defs); i++) {
+ if (x86_defs[i].model_id) {
+ (*cpu_fprintf)(f, "x86 %16s %s\n", x86_defs[i].name,
+ x86_defs[i].model_id);
+ } else {
+ (*cpu_fprintf)(f, "x86 %16s\n", x86_defs[i].name);
+ }
+ }
}
static int cpu_x86_register (CPUX86State *env, const char *cpu_model)
- [Qemu-devel] [PATCH] x86: Show model_id in CPU list.,
Nathan Baum <=