cpus: Pass CPUState to qemu_tcg_init_vcpu()

CPUArchState is no longer needed.

Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
Andreas Färber 2012-05-03 01:50:44 +02:00
parent c3586ba73f
commit e5ab30a2e6
1 changed files with 2 additions and 5 deletions

7
cpus.c
View File

@ -991,11 +991,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 */ /* share a single thread for all cpus with TCG */
if (!tcg_cpu_thread) { if (!tcg_cpu_thread) {
cpu->thread = g_malloc0(sizeof(QemuThread)); cpu->thread = g_malloc0(sizeof(QemuThread));
@ -1056,7 +1053,7 @@ void qemu_init_vcpu(void *_env)
if (kvm_enabled()) { if (kvm_enabled()) {
qemu_kvm_start_vcpu(env); qemu_kvm_start_vcpu(env);
} else if (tcg_enabled()) { } else if (tcg_enabled()) {
qemu_tcg_init_vcpu(env); qemu_tcg_init_vcpu(cpu);
} else { } else {
qemu_dummy_start_vcpu(env); qemu_dummy_start_vcpu(env);
} }