Re: [PATCH v3 08/17] plugins: add inline operation per vcpu

2024-02-06 Thread Pierrick Bouvier
On 2/7/24 07:45, Richard Henderson wrote: On 2/6/24 19:24, Pierrick Bouvier wrote: --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -442,6 +442,13 @@ static TCGOp *append_inline_cb(const struct qemu_plugin_dyn_cb *cb, char *ptr = cb->userp; size_t elem_size = 0;

Re: [PATCH v3 08/17] plugins: add inline operation per vcpu

2024-02-06 Thread Richard Henderson
On 2/6/24 19:24, Pierrick Bouvier wrote: --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -442,6 +442,13 @@ static TCGOp *append_inline_cb(const struct qemu_plugin_dyn_cb *cb, char *ptr = cb->userp; size_t elem_size = 0; size_t offset = 0; +if (!ptr) { +

[PATCH v3 08/17] plugins: add inline operation per vcpu

2024-02-06 Thread Pierrick Bouvier
Extends API with three new functions: qemu_plugin_register_vcpu_{tb, insn, mem}_exec_inline_per_vcpu(). Those functions takes a qemu_plugin_u64_t as input. This allows to have a thread-safe and type-safe version of inline operations. Reviewed-by: Alex Bennée Signed-off-by: Pierrick Bouvier ---