]> git.ipfire.org Git - thirdparty/qemu.git/commit
tcg: Convert TCGState::mttcg_enabled to TriState
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 2 Apr 2025 14:48:24 +0000 (16:48 +0200)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 23 Apr 2025 22:07:32 +0000 (15:07 -0700)
commitd1aa577228e6eeda3589c6480d994ee4bd0d23e5
tree25d67216d786bb75fcab7a6c89ad7a62411205d1
parent61fc4c2bfaee8f4da75ce217911f103da7a8a69e
tcg: Convert TCGState::mttcg_enabled to TriState

Use the OnOffAuto type as 3-state.

Since the TCGState instance is zero-initialized, the
mttcg_enabled is initialzed as AUTO (ON_OFF_AUTO_AUTO).

In tcg_init_machine(), if mttcg_enabled is still AUTO,
set a default value (effectively inlining the
default_mttcg_enabled() method content).

In the tcg_get_thread() getter, consider AUTO / OFF states
as "single", otherwise ON is "multi".

Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/tcg-all.c