Patchwork [qom-next,19/59] cpus: Pass CPUState to qemu_tcg_init_vcpu()

login
register
mail settings
Submitter Andreas Färber
Date May 23, 2012, 3:07 a.m.
Message ID <1337742502-28565-20-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/160837/
State New
Headers show

Comments

Andreas Färber - May 23, 2012, 3:07 a.m.
CPUArchState is no longer needed.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 cpus.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

Patch

diff --git a/cpus.c b/cpus.c
index 7b87ad9..5bae5fc 100644
--- a/cpus.c
+++ b/cpus.c
@@ -988,11 +988,8 @@  void resume_all_vcpus(void)
     }
 }
 
-static void qemu_tcg_init_vcpu(void *_env)
+static void qemu_tcg_init_vcpu(CPUState *cpu)
 {
-    CPUArchState *env = _env;
-    CPUState *cpu = ENV_GET_CPU(env);
-
     /* share a single thread for all cpus with TCG */
     if (!tcg_cpu_thread) {
         cpu->thread = g_malloc0(sizeof(QemuThread));
@@ -1053,7 +1050,7 @@  void qemu_init_vcpu(void *_env)
     if (kvm_enabled()) {
         qemu_kvm_start_vcpu(env);
     } else if (tcg_enabled()) {
-        qemu_tcg_init_vcpu(env);
+        qemu_tcg_init_vcpu(cpu);
     } else {
         qemu_dummy_start_vcpu(env);
     }