[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 07/33] accel/tcg: Record when translator_fake_ldb is used
From: |
Richard Henderson |
Subject: |
[PATCH v2 07/33] accel/tcg: Record when translator_fake_ldb is used |
Date: |
Wed, 24 Apr 2024 16:31:05 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/exec/translator.h | 3 ++-
accel/tcg/translator.c | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/exec/translator.h b/include/exec/translator.h
index 974cc4f9c4..e92dfba035 100644
--- a/include/exec/translator.h
+++ b/include/exec/translator.h
@@ -72,8 +72,8 @@ typedef enum DisasJumpType {
* @num_insns: Number of translated instructions (including current).
* @max_insns: Maximum number of instructions to be translated in this TB.
* @singlestep_enabled: "Hardware" single stepping enabled.
- * @saved_can_do_io: Known value of cpu->neg.can_do_io, or -1 for unknown.
* @plugin_enabled: TCG plugin enabled in this TB.
+ * @fake_insn: True if translator_fake_ldb used.
* @insn_start: The last op emitted by the insn_start hook,
* which is expected to be INDEX_op_insn_start.
*
@@ -88,6 +88,7 @@ typedef struct DisasContextBase {
int max_insns;
bool singlestep_enabled;
bool plugin_enabled;
+ bool fake_insn;
struct TCGOp *insn_start;
void *host_addr[2];
diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c
index a3c246ea37..6863455ed9 100644
--- a/accel/tcg/translator.c
+++ b/accel/tcg/translator.c
@@ -129,6 +129,7 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb,
int *max_insns,
db->max_insns = *max_insns;
db->singlestep_enabled = cflags & CF_SINGLE_STEP;
db->insn_start = NULL;
+ db->fake_insn = false;
db->host_addr[0] = host_pc;
db->host_addr[1] = NULL;
db->record_start = 0;
@@ -433,6 +434,7 @@ uint64_t translator_ldq(CPUArchState *env, DisasContextBase
*db, vaddr pc)
void translator_fake_ldb(DisasContextBase *db, vaddr pc, uint8_t insn8)
{
assert(pc >= db->pc_first);
+ db->fake_insn = true;
record_save(db, pc, &insn8, sizeof(insn8));
plugin_insn_append(pc, &insn8, sizeof(insn8));
}
--
2.34.1
- [PATCH v2 00/33] accel/tcg: Improve disassembly for target and plugin, Richard Henderson, 2024/04/24
- [PATCH v2 02/33] accel/tcg: Hide in_same_page outside of a target-specific context, Richard Henderson, 2024/04/24
- [PATCH v2 01/33] accel/tcg: Use vaddr in translator_ld*, Richard Henderson, 2024/04/24
- [PATCH v2 03/33] accel/tcg: Pass DisasContextBase to translator_fake_ldb, Richard Henderson, 2024/04/24
- [PATCH v2 04/33] accel/tcg: Reorg translator_ld*, Richard Henderson, 2024/04/24
- [PATCH v2 11/33] plugins: Use translator_st for qemu_plugin_insn_data, Richard Henderson, 2024/04/24
- [PATCH v2 07/33] accel/tcg: Record when translator_fake_ldb is used,
Richard Henderson <=
- [PATCH v2 05/33] accel/tcg: Cap the translation block when we encounter mmio, Richard Henderson, 2024/04/24
- [PATCH v2 09/33] plugins: Copy memory in qemu_plugin_insn_data, Richard Henderson, 2024/04/24
- [PATCH v2 08/33] accel/tcg: Record DisasContextBase in tcg_ctx for plugins, Richard Henderson, 2024/04/24
- [PATCH v2 10/33] accel/tcg: Implement translator_st, Richard Henderson, 2024/04/24
- [PATCH v2 06/33] accel/tcg: Record mmio bytes during translation, Richard Henderson, 2024/04/24
- [PATCH v2 12/33] plugins: Read mem_only directly from TB cflags, Richard Henderson, 2024/04/24