aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-01-09 23:38:04 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-05-06 11:24:14 +0200
commit80f034c5b2040b3cfea978361dfd7d813e3c75d9 (patch)
tree203f841efbdca0ef9911433a3cefef7a9dcf1a87 /include
parentfc44d592db69547ca2fc1ec9ee41e6ea81734400 (diff)
downloadqemu-80f034c5b2040b3cfea978361dfd7d813e3c75d9.zip
qemu-80f034c5b2040b3cfea978361dfd7d813e3c75d9.tar.gz
qemu-80f034c5b2040b3cfea978361dfd7d813e3c75d9.tar.bz2
accel/tcg: Move @plugin_mem_cbs from CPUState to CPUNegativeOffsetState
@plugin_mem_cbs is accessed by tcg generated code, move it to CPUNegativeOffsetState. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240429213050.55177-4-philmd@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/core/cpu.h13
-rw-r--r--include/qemu/plugin.h2
2 files changed, 8 insertions, 7 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index a001baf..6efd735 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -342,9 +342,16 @@ 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
*/
typedef struct CPUNegativeOffsetState {
CPUTLB tlb;
+#ifdef CONFIG_PLUGIN
+ /*
+ * The callback pointer are accessed via TCG (see gen_empty_mem_helper).
+ */
+ GArray *plugin_mem_cbs;
+#endif
IcountDecr icount_decr;
bool can_do_io;
} CPUNegativeOffsetState;
@@ -416,7 +423,6 @@ struct qemu_work_item;
* @kvm_fd: vCPU file descriptor for KVM.
* @work_mutex: Lock to prevent multiple access to @work_list.
* @work_list: List of pending asynchronous work.
- * @plugin_mem_cbs: active plugin memory callbacks
* @plugin_state: per-CPU plugin state
* @ignore_memory_transaction_failures: Cached copy of the MachineState
* flag of the same name: allows the board to suppress calling of the
@@ -511,11 +517,6 @@ struct CPUState {
QemuLockCnt in_ioctl_lock;
#ifdef CONFIG_PLUGIN
- /*
- * The callback pointer stays in the main CPUState as it is
- * accessed via TCG (see gen_empty_mem_helper).
- */
- GArray *plugin_mem_cbs;
CPUPluginState *plugin_state;
#endif
diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h
index 1806252..b535bfd 100644
--- a/include/qemu/plugin.h
+++ b/include/qemu/plugin.h
@@ -180,7 +180,7 @@ void qemu_plugin_add_dyn_cb_arr(GArray *arr);
static inline void qemu_plugin_disable_mem_helpers(CPUState *cpu)
{
- cpu->plugin_mem_cbs = NULL;
+ cpu->neg.plugin_mem_cbs = NULL;
}
/**