summaryrefslogtreecommitdiff
path: root/accel/tcg/tcg-accel-ops-rr.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel/tcg/tcg-accel-ops-rr.c')
-rw-r--r--accel/tcg/tcg-accel-ops-rr.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c
index 1a72149f0e..cc8adc2380 100644
--- a/accel/tcg/tcg-accel-ops-rr.c
+++ b/accel/tcg/tcg-accel-ops-rr.c
@@ -152,7 +152,9 @@ static void *rr_cpu_thread_fn(void *arg)
Notifier force_rcu;
CPUState *cpu = arg;
- assert(tcg_enabled());
+ g_assert(tcg_enabled());
+ tcg_cpu_init_cflags(cpu, false);
+
rcu_register_thread();
force_rcu.notify = rr_force_rcu;
rcu_add_force_rcu_notifier(&force_rcu);
@@ -275,9 +277,6 @@ void rr_start_vcpu_thread(CPUState *cpu)
static QemuCond *single_tcg_halt_cond;
static QemuThread *single_tcg_cpu_thread;
- g_assert(tcg_enabled());
- tcg_cpu_init_cflags(cpu, false);
-
if (!single_tcg_cpu_thread) {
cpu->thread = g_new0(QemuThread, 1);
cpu->halt_cond = g_new0(QemuCond, 1);