qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 14/24] accel/tcg: Move plugin fields to CPUNegativeOffsetStat


From: Richard Henderson
Subject: Re: [PATCH 14/24] accel/tcg: Move plugin fields to CPUNegativeOffsetState
Date: Mon, 29 Apr 2024 07:42:01 -0700
User-agent: Mozilla Thunderbird

On 4/28/24 15:14, Philippe Mathieu-Daudé wrote:
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  include/hw/core/cpu.h  | 22 ++++++++++------------
  include/qemu/plugin.h  |  2 +-
  accel/tcg/plugin-gen.c |  8 +++++---
  hw/core/cpu-common.c   |  2 +-
  plugins/core.c         |  8 ++++----
  5 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index beb37342e9..ef8b85b6fe 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -342,9 +342,18 @@ typedef union IcountDecr {
   * CPUNegativeOffsetState: Elements of CPUState most efficiently accessed
   *                         from CPUArchState, via small negative offsets.
   * @can_do_io: True if memory-mapped IO is allowed.
+ * @plugin_mem_cbs: active plugin memory callbacks
+ * @plugin_state: per-CPU plugin state
   */
  typedef struct CPUNegativeOffsetState {
      CPUTLB tlb;
+#ifdef CONFIG_PLUGIN
+    /*
+     * The callback pointer are accessed via TCG (see gen_empty_mem_helper).
+     */
+    GArray *plugin_mem_cbs;
+    CPUPluginState *plugin_state;

While plugin_mem_cbs is accessed by tcg generated code, plugin_state is not.
I would move plugin_state to cpu->accel.


r~



reply via email to

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