qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 02/12] plugins: add inline operation per vcpu


From: Richard Henderson
Subject: Re: [PATCH 02/12] plugins: add inline operation per vcpu
Date: Fri, 12 Jan 2024 09:08:06 +1100
User-agent: Mozilla Thunderbird

On 1/12/24 01:23, Pierrick Bouvier wrote:
Extends API with three new functions:
qemu_plugin_register_vcpu_{tb, insn, mem}_exec_inline_per_vcpu().

Compared to non per_vcpu versions, ptr is now a base, and current
cpu_index and an offset are used to compute memory location on which
operation happens (ptr + cpu_index * offset).

This allows to have a thread-safe version of inline operations.

Having a flexible offset is useful in case a user wants to target a
memory location embedded into a struct. In this case, the offset between
two memory locations will be bigger than sizeof(uint64_t).

Signed-off-by: Pierrick Bouvier<pierrick.bouvier@linaro.org>
---
  include/qemu/qemu-plugin.h   | 56 +++++++++++++++++++++++++++++++++++-
  plugins/api.c                | 36 ++++++++++++++++++++---
  plugins/qemu-plugins.symbols |  3 ++
  3 files changed, 90 insertions(+), 5 deletions(-)

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

r~



reply via email to

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