qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 06/33] accel/tcg: Record mmio bytes during translation


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 06/33] accel/tcg: Record mmio bytes during translation
Date: Mon, 29 Apr 2024 12:34:10 +0200
User-agent: Mozilla Thunderbird

On 25/4/24 01:31, Richard Henderson wrote:
This will be able to replace plugin_insn_append, and will
be usable for disassembly.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
  include/exec/translator.h | 12 ++++++++++++
  accel/tcg/translator.c    | 41 +++++++++++++++++++++++++++++++++++++++
  2 files changed, 53 insertions(+)

diff --git a/include/exec/translator.h b/include/exec/translator.h
index 83fe66cba0..974cc4f9c4 100644
--- a/include/exec/translator.h
+++ b/include/exec/translator.h
@@ -90,6 +90,18 @@ typedef struct DisasContextBase {
      bool plugin_enabled;
      struct TCGOp *insn_start;
      void *host_addr[2];
+
+    /*
+     * Record insn data that we cannot read directly from host memory.
+     * There are only two reasons we cannot use host memory:
+     * (1) We are executing from I/O,
+     * (2) We are executing a synthetic instruction (s390x EX).
+     * In both cases we need record exactly one instruction,
+     * and thus the maximum amount of data we record is limited.
+     */
+    int record_start;
+    int record_len;
+    uint8_t record[32];

Alternatively (matter of style):

       struct {
           unsigned start;
           unsigned len;
           uint8_t data[32];
       }

  } DisasContextBase;

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]