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 <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Jan Kiszka 2011-08-02 16:10:21 +02:00 committed by Anthony Liguori
parent 8417cebfda
commit d5ab9713d2
9 changed files with 37 additions and 21 deletions

View file

@ -81,7 +81,7 @@ CPUS390XState *cpu_s390x_init(const char *cpu_model)
env = qemu_mallocz(sizeof(CPUS390XState));
cpu_exec_init(env);
if (!inited) {
if (tcg_enabled() && !inited) {
inited = 1;
s390x_translate_init();
}