From d5ab9713d2d4037fd56b0adddd26c8d4dc11cf09 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Tue, 2 Aug 2011 16:10:21 +0200 Subject: Avoid allocating TCG resources in non-TCG mode Do not allocate TCG-only resources like the translation buffer when running over KVM or XEN. Saves a "few" bytes in the qemu address space and is also conceptually cleaner. Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori --- target-i386/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'target-i386/helper.c') diff --git a/target-i386/helper.c b/target-i386/helper.c index 182009a..3332195 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -1243,8 +1243,8 @@ CPUX86State *cpu_x86_init(const char *cpu_model) cpu_exec_init(env); env->cpu_model_str = cpu_model; - /* init various static tables */ - if (!inited) { + /* init various static tables used in TCG mode */ + if (tcg_enabled() && !inited) { inited = 1; optimize_flags_init(); #ifndef CONFIG_USER_ONLY -- cgit v1.1