提交 135a972b 编写于 作者: C Christian Borntraeger 提交者: Peter Maydell

translate: early exit in tb_flush if there is no tcg

tb_flush does all kind of things, which are very tcg specific. As it
is called from some places even for KVM (e.g. gdb server) it is better
to detect these cases and do an early exit.
This also fixes a crash in the gdb server that was triggered by
commit 909eaac9 ("tb hash: track translated blocks with qht").
Suggested-by: NPaolo Bonzini <pbonzini@redhat.com>
Reported-by: NRichard Henderson <rth@twiddle.net>
Reported-by: NBrent Baccala <cosine@freesoft.org>
Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
Message-id: 1472148686-39841-1-git-send-email-borntraeger@de.ibm.com>
Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 b69a553b
......@@ -834,6 +834,9 @@ static void page_flush_tb(void)
/* XXX: tb_flush is currently not thread safe */
void tb_flush(CPUState *cpu)
{
if (!tcg_enabled()) {
return;
}
#if defined(DEBUG_FLUSH)
printf("qemu: flush code_size=%ld nb_tbs=%d avg_tb_size=%ld\n",
(unsigned long)(tcg_ctx.code_gen_ptr - tcg_ctx.code_gen_buffer),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册