Message ID | 20240418192525.97451-22-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | include/exec: Rework (part 2) | expand |
On 4/18/24 12:25, Philippe Mathieu-Daudé wrote: > "qemu/plugin.h" only include the huge "hw/core/cpu.h" > because qemu_plugin_disable_mem_helpers() accesses > CPUState::plugin_mem_cbs. In order to avoid including > it, un-inline qemu_plugin_disable_mem_helpers(). > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > include/qemu/plugin.h | 6 +----- > plugins/core.c | 5 +++++ > 2 files changed, 6 insertions(+), 5 deletions(-) I don't see how this helps. All of the places that use qemu_plugin_disable_mem_helpers also have cpu.h. r~
diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index 41db748eda..28467c4a28 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -15,7 +15,6 @@ #include "qemu/plugin-event.h" #include "qemu/bitmap.h" #include "exec/memopidx.h" -#include "hw/core/cpu.h" /* * Option parsing/processing. @@ -227,10 +226,7 @@ void qemu_plugin_atexit_cb(void); void qemu_plugin_add_dyn_cb_arr(GArray *arr); -static inline void qemu_plugin_disable_mem_helpers(CPUState *cpu) -{ - cpu->plugin_mem_cbs = NULL; -} +void qemu_plugin_disable_mem_helpers(CPUState *cpu); /** * qemu_plugin_user_exit(): clean-up callbacks before calling exit callbacks diff --git a/plugins/core.c b/plugins/core.c index 11ca20e626..b25092abb5 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -493,6 +493,11 @@ void exec_inline_op(struct qemu_plugin_dyn_cb *cb, int cpu_index) } } +void qemu_plugin_disable_mem_helpers(CPUState *cpu) +{ + cpu->plugin_mem_cbs = NULL; +} + void qemu_plugin_vcpu_mem_cb(CPUState *cpu, uint64_t vaddr, MemOpIdx oi, enum qemu_plugin_mem_rw rw) {
"qemu/plugin.h" only include the huge "hw/core/cpu.h" because qemu_plugin_disable_mem_helpers() accesses CPUState::plugin_mem_cbs. In order to avoid including it, un-inline qemu_plugin_disable_mem_helpers(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/qemu/plugin.h | 6 +----- plugins/core.c | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-)