[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/32] accel/tcg: Cap the translation block when we encounter mmi
|
From: |
Richard Henderson |
|
Subject: |
[PATCH 05/32] accel/tcg: Cap the translation block when we encounter mmio |
|
Date: |
Fri, 5 Apr 2024 00:24:32 -1000 |
Do not allow translation to proceed beyond one insn with mmio,
as we will not be caching the TranslationBlock.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
accel/tcg/translator.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c
index 42beb1c9b7..438b6d4cba 100644
--- a/accel/tcg/translator.c
+++ b/accel/tcg/translator.c
@@ -236,6 +236,8 @@ static bool translator_ld(CPUArchState *env,
DisasContextBase *db,
/* Use slow path if first page is MMIO. */
if (unlikely(tb_page_addr0(tb) == -1)) {
+ /* We capped translation with first page MMIO in tb_gen_code. */
+ tcg_debug_assert(db->max_insns == 1);
return false;
}
@@ -284,6 +286,8 @@ static bool translator_ld(CPUArchState *env,
DisasContextBase *db,
if (unlikely(new_page1 == -1)) {
tb_unlock_pages(tb);
tb_set_page_addr0(tb, -1);
+ /* Require that this be the final insn. */
+ db->max_insns = db->num_insns;
return false;
}
--
2.34.1
- [PATCH 00/32] accel/tcg: Improve disassembly for target and plugin, Richard Henderson, 2024/04/05
- [PATCH 02/32] accel/tcg: Hide in_same_page outside of a target-specific context, Richard Henderson, 2024/04/05
- [PATCH 04/32] accel/tcg: Reorg translator_ld*, Richard Henderson, 2024/04/05
- [PATCH 05/32] accel/tcg: Cap the translation block when we encounter mmio,
Richard Henderson <=
- [PATCH 07/32] accel/tcg: Record when translator_fake_ldb is used, Richard Henderson, 2024/04/05
- [PATCH 09/32] plugins: Copy memory in qemu_plugin_insn_data, Richard Henderson, 2024/04/05
- [PATCH 10/32] accel/tcg: Implement translator_st, Richard Henderson, 2024/04/05
- [PATCH 08/32] accel/tcg: Record DisasContextBase in tcg_ctx for plugins, Richard Henderson, 2024/04/05
- [PATCH 11/32] plugins: Use translator_st for qemu_plugin_insn_data, Richard Henderson, 2024/04/05
- [PATCH 15/32] plugins: Merge alloc_tcg_plugin_context into plugin_gen_tb_start, Richard Henderson, 2024/04/05
- [PATCH 03/32] accel/tcg: Pass DisasContextBase to translator_fake_ldb, Richard Henderson, 2024/04/05
- [PATCH 01/32] accel/tcg: Use vaddr in translator_ld*, Richard Henderson, 2024/04/05