qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC qom-cpu v2 0/2] target-i386: X86CPU subclasses


From: Andreas Färber
Subject: [Qemu-devel] [RFC qom-cpu v2 0/2] target-i386: X86CPU subclasses
Date: Mon, 10 Dec 2012 23:59:30 +0100

Hello,

Had some long train rides today, so here's a new throw at X86CPU subclasses:
After having initially proposed a "minimal" conversion by reusing the
list/array of CPU definitions, public opinion seems to have shifted from
preferring initfns to preferring class_inits. Combined with per-type TypeInfos
this allows to create custom hierarchies to share data among CPU families.
Thereby I do what I have long tried to avoid: touching almost every line of
x86 CPU definitions with risk of merge conflicts. This conversion was done
100% manually and does not touch the feature flags apart from the assignment
and semicolon, hopefully manageable for review; otherwise suggestions welcome.

Although in this series only the CPU properties that I had prepared earlier
for this purpose get used, CPU feature properties still make sense for
management tools to inspect and modify bits of a CPU just created.

This mini-series is based on my latest cleanup proposals.

Regards,
Andreas

v1-> v2:
* Instead of turning x86_def_t into X86CPUInfo to initialize classes,
  drop it completely and register types manually with customizable TypeInfos
* Use new list facilities for printing -cpu ? models
* Adopt new name scheme suggested by Eduardo and ideas from my alpha series
* Keep short names in -cpu ? output for alignment reasons
* Merge cpu_x86_init() into cpu.c:cpu_x86_register()
* Append patch showing Haswell as subclass of SandyBridge

Cc: Eduardo Habkost <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: Blue Swirl <address@hidden>
Cc: Anthony Liguori <address@hidden>

Andreas Färber (2):
  target-i386: Convert CPU definitions into X86CPU subclasses
  target-i386: Turn Haswell into subclass of SandyBridge

 target-i386/cpu-qom.h |   17 +
 target-i386/cpu.c     | 1475 +++++++++++++++++++++++++++++--------------------
 target-i386/helper.c  |   24 -
 3 Dateien geändert, 898 Zeilen hinzugefügt(+), 618 Zeilen entfernt(-)

-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]