Re: [PATCH v3 7/8] plugins: distinct types for callbacks
On 3/25/24 02:41, Pierrick Bouvier wrote: To prevent errors when writing new types of callbacks or inline operations, we split callbacks data to distinct types. Signed-off-by: Pierrick Bouvier --- include/qemu/plugin.h | 46 ++--- plugins/plugin.h | 2 +- accel/tcg/plugin-gen.c | 58 +--- plugins/core.c | 76 ++ 4 files changed, 98 insertions(+), 84 deletions(-) diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index bb224b8e4c7..a078229942f 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -73,34 +73,40 @@ enum plugin_dyn_cb_type { PLUGIN_CB_INLINE_STORE_U64, }; +struct qemu_plugin_regular_cb { +union qemu_plugin_cb_sig f; +TCGHelperInfo *info; +void *userp; +enum qemu_plugin_mem_rw rw; +}; + +struct qemu_plugin_inline_cb { +qemu_plugin_u64 entry; +enum qemu_plugin_op op; +uint64_t imm; +enum qemu_plugin_mem_rw rw; +}; Do you still need 'op' anymore here? It seems redundant with 'type'. Otherwise, Reviewed-by: Richard Henderson r~
Re: [PATCH v3 7/8] plugins: distinct types for callbacks
On 3/25/24 23:23, Richard Henderson wrote: On 3/25/24 02:41, Pierrick Bouvier wrote: To prevent errors when writing new types of callbacks or inline operations, we split callbacks data to distinct types. Signed-off-by: Pierrick Bouvier --- include/qemu/plugin.h | 46 ++--- plugins/plugin.h | 2 +- accel/tcg/plugin-gen.c | 58 +--- plugins/core.c | 76 ++ 4 files changed, 98 insertions(+), 84 deletions(-) diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index bb224b8e4c7..a078229942f 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -73,34 +73,40 @@ enum plugin_dyn_cb_type { PLUGIN_CB_INLINE_STORE_U64, }; +struct qemu_plugin_regular_cb { +union qemu_plugin_cb_sig f; +TCGHelperInfo *info; +void *userp; +enum qemu_plugin_mem_rw rw; +}; + +struct qemu_plugin_inline_cb { +qemu_plugin_u64 entry; +enum qemu_plugin_op op; +uint64_t imm; +enum qemu_plugin_mem_rw rw; +}; Do you still need 'op' anymore here? It seems redundant with 'type'. You're right, removed it in a new commit, will post new series. Otherwise, Reviewed-by: Richard Henderson r~