[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 02/13] accel/tcg: Restrict cpu_plugin_mem_cbs_enabled() to TCG
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 02/13] accel/tcg: Restrict cpu_plugin_mem_cbs_enabled() to TCG |
Date: |
Tue, 30 Apr 2024 14:27:56 +0200 |
So far cpu_plugin_mem_cbs_enabled() is only called from
TCG, so reduce it to accel/tcg/.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <5f59c754-44e5-4743-a2dd-87ef8e13eadf@linaro.org>
---
accel/tcg/internal-common.h | 17 +++++++++++++++++
include/hw/core/cpu.h | 17 -----------------
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h
index df317e7496..5061687900 100644
--- a/accel/tcg/internal-common.h
+++ b/accel/tcg/internal-common.h
@@ -24,6 +24,23 @@ static inline bool cpu_in_serial_context(CPUState *cs)
return !tcg_cflags_has(cs, CF_PARALLEL) || cpu_in_exclusive_context(cs);
}
+/**
+ * cpu_plugin_mem_cbs_enabled() - are plugin memory callbacks enabled?
+ * @cs: CPUState pointer
+ *
+ * The memory callbacks are installed if a plugin has instrumented an
+ * instruction for memory. This can be useful to know if you want to
+ * force a slow path for a series of memory accesses.
+ */
+static inline bool cpu_plugin_mem_cbs_enabled(const CPUState *cpu)
+{
+#ifdef CONFIG_PLUGIN
+ return !!cpu->plugin_mem_cbs;
+#else
+ return false;
+#endif
+}
+
void tcg_cpu_exit(CPUState *cpu);
#endif
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index beb37342e9..55555be618 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -1109,23 +1109,6 @@ void cpu_watchpoint_remove_by_ref(CPUState *cpu,
CPUWatchpoint *watchpoint);
void cpu_watchpoint_remove_all(CPUState *cpu, int mask);
#endif
-/**
- * cpu_plugin_mem_cbs_enabled() - are plugin memory callbacks enabled?
- * @cs: CPUState pointer
- *
- * The memory callbacks are installed if a plugin has instrumented an
- * instruction for memory. This can be useful to know if you want to
- * force a slow path for a series of memory accesses.
- */
-static inline bool cpu_plugin_mem_cbs_enabled(const CPUState *cpu)
-{
-#ifdef CONFIG_PLUGIN
- return !!cpu->plugin_mem_cbs;
-#else
- return false;
-#endif
-}
-
/**
* cpu_get_address_space:
* @cpu: CPU to get address space from
--
2.41.0
- [PATCH v3 00/13] exec: Rework around CPUState user fields (part 2), Philippe Mathieu-Daudé, 2024/04/30
- [PATCH v3 01/13] accel/tcg: Restrict qemu_plugin_vcpu_exit_hook() to TCG plugins, Philippe Mathieu-Daudé, 2024/04/30
- [PATCH v3 02/13] accel/tcg: Restrict cpu_plugin_mem_cbs_enabled() to TCG,
Philippe Mathieu-Daudé <=
- [PATCH v3 03/13] accel/tcg: Move @plugin_mem_cbs from CPUState to CPUNegativeOffsetState, Philippe Mathieu-Daudé, 2024/04/30
- [PATCH v3 04/13] accel/tcg: Move @plugin_state from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/30
- [PATCH v3 05/13] accel/tcg: Restrict cpu_loop_exit_requested() to TCG, Philippe Mathieu-Daudé, 2024/04/30
- [PATCH v3 06/13] accel/tcg: Restrict IcountDecr / can_do_io / CPUTLB to TCG, Philippe Mathieu-Daudé, 2024/04/30
- [PATCH v3 07/13] accel/tcg: Move @jmp_env from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/30
- [PATCH v3 08/13] accel/tcg: Move @cflags_next_tb from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/30
- [PATCH v3 09/13] accel/tcg: Move @iommu_notifiers from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/30
- [PATCH v3 10/13] accel/tcg: Move @tcg_cflags from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/30
- [PATCH v3 11/13] accel/tcg: Restrict icount to system emulation, Philippe Mathieu-Daudé, 2024/04/30
- [PATCH v3 12/13] accel/tcg: Move icount fields from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/30