mbox series

[v3,0/8] TCG plugins new inline operations

Message ID 20240325124151.336003-1-pierrick.bouvier@linaro.org (mailing list archive)
Headers show
Series TCG plugins new inline operations | expand

Message

Pierrick Bouvier March 25, 2024, 12:41 p.m. UTC
This series implement two new operations for plugins:
- Store inline allows to write a specific value to a scoreboard.
- Conditional callback executes a callback only when a given condition is true.
  The condition is evaluated inline.

It's possible to mix various inline operations (add, store) with conditional
callbacks, allowing efficient "trap" based counters.

It builds on top of new scoreboard API, introduced in the previous series.

v2
--

- fixed issue with udata not being passed to conditional callback
- added specific test for this in tests/plugin/inline.c (udata was NULL before).

v3
--

- rebased on top of "plugins: Rewrite plugin code generation":
  20240316015720.3661236-1-richard.henderson@linaro.org
- single pass code generation
- small cleanups for code generation

Pierrick Bouvier (8):
  plugins: prepare introduction of new inline ops
  plugins: extract generate ptr for qemu_plugin_u64
  plugins: add new inline op STORE_U64
  tests/plugin/inline: add test for STORE_U64 inline op
  plugins: conditional callbacks
  tests/plugin/inline: add test for conditional callback
  plugins: distinct types for callbacks
  plugins: extract cpu_index generate

 include/qemu/plugin.h        |  43 +++++++----
 include/qemu/qemu-plugin.h   |  80 +++++++++++++++++++-
 plugins/plugin.h             |  10 ++-
 accel/tcg/plugin-gen.c       | 138 +++++++++++++++++++++++++++--------
 plugins/api.c                |  39 ++++++++++
 plugins/core.c               | 106 ++++++++++++++++++++-------
 tests/plugin/inline.c        | 130 +++++++++++++++++++++++++++++++--
 plugins/qemu-plugins.symbols |   2 +
 8 files changed, 465 insertions(+), 83 deletions(-)