qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 7/8] plugins: distinct types for callbacks


From: Richard Henderson
Subject: Re: [PATCH v3 7/8] plugins: distinct types for callbacks
Date: Mon, 25 Mar 2024 09:23:17 -1000
User-agent: Mozilla Thunderbird

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 <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;
+};

Do you still need 'op' anymore here?
It seems redundant with 'type'.

Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]