mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
qom: Introduce CPUClass.tcg_initialize
Move target cpu tcg initialization to common code, called from cpu_exec_realizefn. Acked-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
11f4e8f8bf
commit
55c3ceef61
32 changed files with 40 additions and 163 deletions
|
@ -117,7 +117,6 @@ static void uc32_cpu_initfn(Object *obj)
|
|||
CPUState *cs = CPU(obj);
|
||||
UniCore32CPU *cpu = UNICORE32_CPU(obj);
|
||||
CPUUniCore32State *env = &cpu->env;
|
||||
static bool inited;
|
||||
|
||||
cs->env_ptr = env;
|
||||
|
||||
|
@ -130,11 +129,6 @@ static void uc32_cpu_initfn(Object *obj)
|
|||
#endif
|
||||
|
||||
tlb_flush(cs);
|
||||
|
||||
if (tcg_enabled() && !inited) {
|
||||
inited = true;
|
||||
uc32_translate_init();
|
||||
}
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_uc32_cpu = {
|
||||
|
@ -162,6 +156,7 @@ static void uc32_cpu_class_init(ObjectClass *oc, void *data)
|
|||
#else
|
||||
cc->get_phys_page_debug = uc32_cpu_get_phys_page_debug;
|
||||
#endif
|
||||
cc->tcg_initialize = uc32_translate_init;
|
||||
dc->vmsd = &vmstate_uc32_cpu;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue