summaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
Diffstat (limited to 'accel')
-rw-r--r--accel/tcg/cpu-exec-common.c2
-rw-r--r--accel/tcg/tcg-all.c1
-rw-r--r--accel/tcg/translate-all.c6
3 files changed, 3 insertions, 6 deletions
diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c
index e81da276bb..5b4ae54a4d 100644
--- a/accel/tcg/cpu-exec-common.c
+++ b/accel/tcg/cpu-exec-common.c
@@ -23,6 +23,8 @@
#include "exec/exec-all.h"
#include "exec/memory-internal.h"
+bool tcg_allowed;
+
/* exit the current TB, but without causing any exception to be raised */
void cpu_loop_exit_noexc(CPUState *cpu)
{
diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
index c1ccad34f1..56dbb56a16 100644
--- a/accel/tcg/tcg-all.c
+++ b/accel/tcg/tcg-all.c
@@ -33,7 +33,6 @@
#include "qemu/main-loop.h"
unsigned long tcg_tb_size;
-static bool tcg_allowed = true;
#ifndef CONFIG_USER_ONLY
/* mask must never be zero, except for A20 change call */
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 4fda383924..f768681188 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -784,6 +784,7 @@ static void tb_htable_init(void)
size. */
void tcg_exec_init(unsigned long tb_size)
{
+ tcg_allowed = true;
cpu_gen_init();
page_init();
tb_htable_init();
@@ -795,11 +796,6 @@ void tcg_exec_init(unsigned long tb_size)
#endif
}
-bool tcg_enabled(void)
-{
- return tcg_ctx.code_gen_buffer != NULL;
-}
-
/*
* Allocate a new translation block. Flush the translation buffer if
* too many translation blocks or too much generated code.