summary refs log tree commit diff stats
path: root/qom/cpu.c
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2016-10-20 13:26:02 +0200
committerEduardo Habkost <ehabkost@redhat.com>2016-10-24 17:29:16 -0200
commit39e329e341da375b8d66444ffe93c79d7a883350 (patch)
tree90043e744a3165277ba2363cc025ad97da8945a1 /qom/cpu.c
parent00d0f9fd6602a27b204f672ef5bc8e69736c7ff1 (diff)
downloadfocaccia-qemu-39e329e341da375b8d66444ffe93c79d7a883350.tar.gz
focaccia-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 'qom/cpu.c')
-rw-r--r--qom/cpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/qom/cpu.c b/qom/cpu.c
index c40f774a0c..85f1132043 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -362,6 +362,8 @@ static void cpu_common_initfn(Object *obj)
     QTAILQ_INIT(&cpu->watchpoints);
 
     cpu->trace_dstate = bitmap_new(trace_get_vcpu_event_count());
+
+    cpu_exec_initfn(cpu);
 }
 
 static void cpu_common_finalize(Object *obj)