To prevent errors when writing new types of callbacks or inline
operations, we split callbacks data to distinct types.
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
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;
+};