Skip to content

target-i386: CPU init cleanup for CPU classes/properties

Eduardo Habkost qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17target-i386/cpu.c: coding style fixtarget-i386/cpu.c+11 -110 replies
2/17target-i386: move cpu_x86_init() to cpu.ctarget-i386/cpu.c target-i386/cpu.h target-i386/helper.c+25 -261 reply
3/17target-i386: cpu: rename x86_def_t to X86CPUDefinitiontarget-i386/cpu.c+17 -160 replies
4/17target-i386: x86_cpudef_setup(): cosmetic change on commenttarget-i386/cpu.c+1 -20 replies
5/17target-i386: cpu_x86_init(): move error handling to end of functiontarget-i386/cpu.c+8 -52 replies
6/17target-i386: cpu_x86_init(): print error message in case of errortarget-i386/cpu.c+1 -00 replies
7/17target-i386: cpu_x86_register(): report errors using Error parametertarget-i386/cpu.c+3 -40 replies
8/17target-i386: cpu_x86_register(): reorder CPU property settingtarget-i386/cpu.c+4 -40 replies
9/17target-i386: move out CPU features initialization to separate functarget-i386/cpu.c+14 -61 reply
10/17target-i386: kill cpu_x86_register()target-i386/cpu.c+8 -140 replies
11/17target-i386: return Error from cpu_x86_find_by_name()target-i386/cpu.c+5 -20 replies
12/17target-i386: cpu_x86_find_by_name(): split CPU model and feature string firsttarget-i386/cpu.c+15 -60 replies
13/17target-i386: cpu: create cpu_x86_find_cpudef() functiontarget-i386/cpu.c+28 -80 replies
14/17target-i386: cpu_x86_init(): rename cpu_model to cpu_stringtarget-i386/cpu.c+3 -30 replies
15/17target-i386: cpu_x86_init(): eliminate extra 'def1' variabletarget-i386/cpu.c+4 -40 replies
16/17target-i386: cpu: separate cpudef lookup from feature string parsingtarget-i386/cpu.c+19 -210 replies
17/17target-i386: cpu_x86_init(): reorder split of CPU string and creation of CPU objecttarget-i386/cpu.c+10 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 00/17] target-i386: CPU init cleanup for CPU classes/properties

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(-)
Signature · 1 line
1.7.11.7