In qemu_tcg_mttcg_enabled, read the value from TCGState
and eliminate the separate global variable.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
TYPE_TCG_ACCEL)
#ifndef CONFIG_USER_ONLY
-
-static bool mttcg_enabled;
-
bool qemu_tcg_mttcg_enabled(void)
{
- return mttcg_enabled;
+ TCGState *s = TCG_STATE(current_accel());
+ return s->mttcg_enabled;
}
-
#endif /* !CONFIG_USER_ONLY */
/*
#ifndef CONFIG_USER_ONLY
if (s->mttcg_enabled) {
max_threads = ms->smp.max_cpus;
- mttcg_enabled = true;
}
#endif
tcg_init(s->tb_size * MiB, s->splitwx_enabled, max_threads);