diff options
| author | Laurent Vivier | 2016-10-20 13:26:02 +0200 |
|---|---|---|
| committer | Eduardo Habkost | 2016-10-24 21:29:16 +0200 |
| commit | 39e329e341da375b8d66444ffe93c79d7a883350 (patch) | |
| tree | 90043e744a3165277ba2363cc025ad97da8945a1 /exec.c | |
| parent | pc: q35: Bump max_cpus to 288 (diff) | |
| download | qemu-39e329e341da375b8d66444ffe93c79d7a883350.tar.gz qemu-39e329e341da375b8d66444ffe93c79d7a883350.tar.xz qemu-39e329e341da375b8d66444ffe93c79d7a883350.zip | |
exec: split cpu_exec_init()
Put in cpu_exec_initfn() what initializes the CPU,
and leave in cpu_exec_init() what adds it to the environment.
As cpu_exec_initfn() is called by all XX_cpu_initfn(), call it
directly in cpu_common_initfn().
cpu_exec_init() is now a realize function, it will be renamed
to cpu_exec_realizefn() and moved to the XX_cpu_realizefn()
function in a following patch.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'exec.c')
| -rw-r--r-- | exec.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -610,11 +610,8 @@ void cpu_exec_exit(CPUState *cpu) } } -void cpu_exec_init(CPUState *cpu, Error **errp) +void cpu_exec_initfn(CPUState *cpu) { - CPUClass *cc ATTRIBUTE_UNUSED = CPU_GET_CLASS(cpu); - Error *local_err ATTRIBUTE_UNUSED = NULL; - cpu->as = NULL; cpu->num_ases = 0; @@ -635,6 +632,11 @@ void cpu_exec_init(CPUState *cpu, Error **errp) cpu->memory = system_memory; object_ref(OBJECT(cpu->memory)); #endif +} + +void cpu_exec_init(CPUState *cpu, Error **errp) +{ + CPUClass *cc ATTRIBUTE_UNUSED = CPU_GET_CLASS(cpu); cpu_list_add(cpu); |
