Skip to contentSkip to conversation

x86: Show model_id in CPU list.

PATCH In review Nathan Baum 2 participants 2 messages Sep 28, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Show model_id in CPU list.

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?

---

target-i386/helper.c +0 -0
index 8111f25..57eed1a 100644
@@ -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)

#1 lore raw
Quoted 11 lines · Nathan Baum

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
Quoted 4 lines

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?

I fixed that already in the CPUID rework patch series I sent out 10 days ago:
http://lists.gnu.org/archive/html/qemu-devel/2009-09/msg01236.html

Anthony's staging tree (http://repo.or.cz/w/qemu/aliguori-queue.git) has been pretty stale for the last 2 weeks, so if my patch series should be applied before your patch, you have to rework your's (should be almost trivial, see patch 08/21).

Regards,
Andre.

Signature · 9 lines
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 488-3567-12
----to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd; Thomas M. McCoy; Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632