mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
plugins: add inline operation per vcpu
Extends API with three new functions: qemu_plugin_register_vcpu_{tb, insn, mem}_exec_inline_per_vcpu(). Those functions takes a qemu_plugin_u64 as input. This allows to have a thread-safe and type-safe version of inline operations. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20240304130036.124418-5-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240305121005.3528075-18-alex.bennee@linaro.org>
This commit is contained in:
parent
62f92b8d97
commit
0bcebaba45
7 changed files with 126 additions and 2 deletions
|
@ -443,6 +443,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) {
|
||||
/* use inline entry */
|
||||
ptr = cb->inline_insn.entry.score->data->data;
|
||||
elem_size = g_array_get_element_size(cb->inline_insn.entry.score->data);
|
||||
offset = cb->inline_insn.entry.offset;
|
||||
}
|
||||
|
||||
op = copy_ld_i32(&begin_op, op);
|
||||
op = copy_mul_i32(&begin_op, op, elem_size);
|
||||
op = copy_ext_i32_ptr(&begin_op, op);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue