diff options
| author | Alex Bennée <alex.bennee@linaro.org> | 2024-02-27 14:43:28 +0000 |
|---|---|---|
| committer | Alex Bennée <alex.bennee@linaro.org> | 2024-02-28 09:11:42 +0000 |
| commit | c006147122dede4440c027142ce3025f64e199c0 (patch) | |
| tree | e250bdbb06eca51818dd140bf3a99505b0a90fbd /include/qemu/plugin.h | |
| parent | c3d0b46645d4b95b1fa24f4911738cb59d26173e (diff) | |
| download | focaccia-qemu-c006147122dede4440c027142ce3025f64e199c0.tar.gz focaccia-qemu-c006147122dede4440c027142ce3025f64e199c0.zip | |
plugins: create CPUPluginState and migrate plugin_mask
As we expand the per-vCPU data for plugins we don't want to pollute CPUState. For now this just moves the plugin_mask (renamed to event_mask) as the memory callbacks are accessed directly by TCG generated code. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240227144335.1196131-23-alex.bennee@linaro.org>
Diffstat (limited to 'include/qemu/plugin.h')
| -rw-r--r-- | include/qemu/plugin.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index b0c5ac6829..b3c94a34aa 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -186,6 +186,19 @@ struct qemu_plugin_insn *qemu_plugin_tb_insn_get(struct qemu_plugin_tb *tb, return insn; } +/** + * struct CPUPluginState - per-CPU state for plugins + * @event_mask: plugin event bitmap. Modified only via async work. + */ +struct CPUPluginState { + DECLARE_BITMAP(event_mask, QEMU_PLUGIN_EV_MAX); +}; + +/** + * qemu_plugin_create_vcpu_state: allocate plugin state + */ +CPUPluginState *qemu_plugin_create_vcpu_state(void); + void qemu_plugin_vcpu_init_hook(CPUState *cpu); void qemu_plugin_vcpu_exit_hook(CPUState *cpu); void qemu_plugin_tb_trans_cb(CPUState *cpu, struct qemu_plugin_tb *tb); |