]> Git Repo - qemu.git/blobdiff - target-s390x/cpu.c
cpu: Introduce ENV_OFFSET macros
[qemu.git] / target-s390x / cpu.c
index ee15783b94886331257a6080f120b3d858d0999e..b74654724df2d08b10c93f705be57171e50426f8 100644 (file)
@@ -110,13 +110,16 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp)
 
 static void s390_cpu_initfn(Object *obj)
 {
+    CPUState *cs = CPU(obj);
     S390CPU *cpu = S390_CPU(obj);
     CPUS390XState *env = &cpu->env;
+    static bool inited;
     static int cpu_num = 0;
 #if !defined(CONFIG_USER_ONLY)
     struct tm tm;
 #endif
 
+    cs->env_ptr = env;
     cpu_exec_init(env);
 #if !defined(CONFIG_USER_ONLY)
     qemu_register_reset(s390_cpu_machine_reset_cb, cpu);
@@ -133,6 +136,11 @@ static void s390_cpu_initfn(Object *obj)
 #endif
     env->cpu_num = cpu_num++;
     env->ext_index = -1;
+
+    if (tcg_enabled() && !inited) {
+        inited = true;
+        s390x_translate_init();
+    }
 }
 
 static void s390_cpu_finalize(Object *obj)
This page took 0.02382 seconds and 4 git commands to generate.