From 8d4e9146b3568022ea5730d92841345d41275d66 Mon Sep 17 00:00:00 2001 From: KONRAD Frederic Date: Thu, 23 Feb 2017 18:29:08 +0000 Subject: tcg: add options for enabling MTTCG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We know there will be cases where MTTCG won't work until additional work is done in the front/back ends to support. It will however be useful to be able to turn it on. As a result MTTCG will default to off unless the combination is supported. However the user can turn it on for the sake of testing. Signed-off-by: KONRAD Frederic [AJB: move to -accel tcg,thread=multi|single, defaults] Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- include/qom/cpu.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/qom/cpu.h') diff --git a/include/qom/cpu.h b/include/qom/cpu.h index f69b2407ea..2cf4ecf144 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -415,6 +415,15 @@ extern struct CPUTailQ cpus; extern __thread CPUState *current_cpu; +/** + * qemu_tcg_mttcg_enabled: + * Check whether we are running MultiThread TCG or not. + * + * Returns: %true if we are in MTTCG mode %false otherwise. + */ +extern bool mttcg_enabled; +#define qemu_tcg_mttcg_enabled() (mttcg_enabled) + /** * cpu_paging_enabled: * @cpu: The CPU whose state is to be inspected. -- cgit v1.2.3