qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/17] target-i386: CPU init cleanup for CPU classes/properties
@ 2012-11-12 21:38 Eduardo Habkost
  2012-11-12 21:38 ` [Qemu-devel] [PATCH 01/17] target-i386/cpu.c: coding style fix Eduardo Habkost
                   ` (16 more replies)
  0 siblings, 17 replies; 22+ messages in thread
From: Eduardo Habkost @ 2012-11-12 21:38 UTC (permalink / raw)
  To: qemu-devel, Igor Mammedov, Andreas Färber; +Cc: Don Slutz

Hi,

One of the problems when coordinating with the recent x86 CPU work (CPU
properties, APIC ID topology fixes) is to have a sane x86 CPU initialization
code to be used as base.

To make things worse, the cleanups we're doing are buried inside series that do
more intrusive work. This is an attempt to establish a saner base for further
work.

Except for additional error messages when initialization fails, this series
should not introduce any behavior change, but just clean up cpu_x86_init() to
look like this:

    name, features = g_strsplit(cpu_string, ",", 2);
    cpu = X86_CPU(object_new(TYPE_X86_CPU));
    cpu_x86_find_cpudef(name, &def, &error)
    cpu_x86_parse_featurestr(&def, features, &error)
    cpudef_2_x86_cpu(cpu, &def, &error)
    x86_cpu_realize(OBJECT(cpu), &error);

Basically, this isolates the parts of the code that do:
 - Splitting cpu_model string into CPU model and feature string;
 - CPU object creation;
 - CPU model lookup;
 - CPU feature string parsing.

After this, I will send an additional patch to introduce CPU classes on
target-i386, based on this series.

Eduardo Habkost (16):
  target-i386/cpu.c: coding style fix
  target-i386: move cpu_x86_init() to cpu.c
  target-i386: cpu: rename x86_def_t to X86CPUDefinition
  target-i386: x86_cpudef_setup(): cosmetic change on comment
  target-i386: cpu_x86_init(): move error handling to end of function
  target-i386: cpu_x86_init(): print error message in case of error
  target-i386: cpu_x86_register(): report errors using Error parameter
  target-i386: cpu_x86_register(): reorder CPU property setting
  target-i386: kill cpu_x86_register()
  target-i386: return Error from cpu_x86_find_by_name()
  target-i386: cpu_x86_find_by_name(): split CPU model and feature
    string first
  target-i386: cpu: create cpu_x86_find_cpudef() function
  target-i386: cpu_x86_init(): rename cpu_model to cpu_string
  target-i386: cpu_x86_init(): eliminate extra 'def1' variable
  target-i386: cpu: separate cpudef lookup from feature string parsing
  target-i386: cpu_x86_init(): reorder split of CPU string and creation
    of CPU object

Igor Mammedov (1):
  target-i386: move out CPU features initialization to separate func

 target-i386/cpu.c    | 175 ++++++++++++++++++++++++++++++++++-----------------
 target-i386/cpu.h    |   1 -
 target-i386/helper.c |  24 -------
 3 files changed, 118 insertions(+), 82 deletions(-)

-- 
1.7.11.7

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

end of thread, other threads:[~2012-11-28 14:04 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-12 21:38 [Qemu-devel] [PATCH 00/17] target-i386: CPU init cleanup for CPU classes/properties Eduardo Habkost
2012-11-12 21:38 ` [Qemu-devel] [PATCH 01/17] target-i386/cpu.c: coding style fix Eduardo Habkost
2012-11-12 21:38 ` [Qemu-devel] [PATCH 02/17] target-i386: move cpu_x86_init() to cpu.c Eduardo Habkost
2012-11-28  6:02   ` li guang
2012-11-12 21:38 ` [Qemu-devel] [PATCH 03/17] target-i386: cpu: rename x86_def_t to X86CPUDefinition Eduardo Habkost
2012-11-12 21:38 ` [Qemu-devel] [PATCH 04/17] target-i386: x86_cpudef_setup(): cosmetic change on comment Eduardo Habkost
2012-11-12 21:38 ` [Qemu-devel] [PATCH 05/17] target-i386: cpu_x86_init(): move error handling to end of function Eduardo Habkost
2012-11-28  6:08   ` li guang
2012-11-28 13:21     ` Eduardo Habkost
2012-11-12 21:38 ` [Qemu-devel] [PATCH 06/17] target-i386: cpu_x86_init(): print error message in case of error Eduardo Habkost
2012-11-12 21:38 ` [Qemu-devel] [PATCH 07/17] target-i386: cpu_x86_register(): report errors using Error parameter Eduardo Habkost
2012-11-12 21:38 ` [Qemu-devel] [PATCH 08/17] target-i386: cpu_x86_register(): reorder CPU property setting Eduardo Habkost
2012-11-12 21:38 ` [Qemu-devel] [PATCH 09/17] target-i386: move out CPU features initialization to separate func Eduardo Habkost
2012-11-17 16:03   ` Blue Swirl
2012-11-12 21:38 ` [Qemu-devel] [PATCH 10/17] target-i386: kill cpu_x86_register() Eduardo Habkost
2012-11-12 21:38 ` [Qemu-devel] [PATCH 11/17] target-i386: return Error from cpu_x86_find_by_name() Eduardo Habkost
2012-11-12 21:38 ` [Qemu-devel] [PATCH 12/17] target-i386: cpu_x86_find_by_name(): split CPU model and feature string first Eduardo Habkost
2012-11-12 21:38 ` [Qemu-devel] [PATCH 13/17] target-i386: cpu: create cpu_x86_find_cpudef() function Eduardo Habkost
2012-11-12 21:38 ` [Qemu-devel] [PATCH 14/17] target-i386: cpu_x86_init(): rename cpu_model to cpu_string Eduardo Habkost
2012-11-12 21:39 ` [Qemu-devel] [PATCH 15/17] target-i386: cpu_x86_init(): eliminate extra 'def1' variable Eduardo Habkost
2012-11-12 21:39 ` [Qemu-devel] [PATCH 16/17] target-i386: cpu: separate cpudef lookup from feature string parsing Eduardo Habkost
2012-11-12 21:39 ` [Qemu-devel] [PATCH 17/17] target-i386: cpu_x86_init(): reorder split of CPU string and creation of CPU object Eduardo Habkost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).