[PATCH 5/8] plugins: implement QPP callbacks

2022-12-13 Thread Andrew Fasano
From: Elysia Witham Plugins are able to use API functions which are explained in to create and run their own callbacks and register functions on another plugin's callbacks. Signed-off-by: Elysia Witham Signed-off-by: Andrew Fasano --- include/qemu/qemu-plugin.h

[PATCH 2/8] plugins: version 2, require unique plugin names

2022-12-13 Thread Andrew Fasano
From: Elysia Witham In order for the QPP API to resolve interactions between plugins, plugins must export their own names which cannot match any other loaded plugins. Signed-off-by: Elysia Witham Signed-off-by: Andrew Fasano --- include/qemu/qemu-plugin.h | 2 +- plugins/core.c

[PATCH 6/8] plugins: implement QPP import function

2022-12-13 Thread Andrew Fasano
From: Elysia Witham Plugins can export functions or import functions from other plugins using their name and the function name. This is also described in . Signed-off-by: Elysia Witham Signed-off-by: Andrew Fasano --- include/qemu/qemu-plugin.h | 10 ++ plugins/api.c

[PATCH 7/8] include/qemu: added macro for QPP import function

2022-12-13 Thread Andrew Fasano
, "_qpp" will be appended to the end of the function name. Signed-off-by: Elysia Witham Signed-off-by: Andrew Fasano --- include/qemu/plugin-qpp.h | 54 +++ 1 file changed, 54 insertions(+) create mode 100644 include/qemu/plugin-qpp.h diff --git

[PATCH 0/8] Inter-plugin interactions with QPP

2022-12-13 Thread Andrew Fasano
lugins/syscalls_logger.c We plan to explore integrating this with qemu's existing user-mode syscall tracing system and would love to eventually merge these plugins if there's interest and the necessary APIs (QPP + register/memory access) become available. We welcome any feedback for this

[PATCH 1/8] docs/devel: describe QPP API

2022-12-13 Thread Andrew Fasano
From: Elysia Witham The new QPP API allows plugin-to-plugin interaction for creating and using callbacks as well as importing and exporting functions. The new test plugins qpp_srv and qpp_client demonstrate how plugins use the new API. Signed-off-by: Elysia Witham Signed-off-by: Andrew Fasano

[PATCH 8/8] tests: build and run QPP tests

2022-12-13 Thread Andrew Fasano
From: Elysia Witham These test plugins demonstrate the QPP API changes by exporting and importing functions and creating and registering callbacks. These tests are integrated into the `make check-tcg` tests. Signed-off-by: Elysia Witham Signed-off-by: Andrew Fasano --- tests/Makefile.include

[PATCH 3/8] plugins: add id_to_plugin_name

2022-12-13 Thread Andrew Fasano
From: Elysia Witham Plugins will pass their unique id when creating callbacks to ensure they are associated with the correct plugin. This internal function resolves those ids to the declared names. Signed-off-by: Elysia Witham Signed-off-by: Andrew Fasano --- plugins/core.c | 12

[PATCH 4/8] plugins: add core API functions for QPP callbacks

2022-12-13 Thread Andrew Fasano
a target plugin. Signed-off-by: Elysia Witham Signed-off-by: Andrew Fasano --- include/qemu/qemu-plugin.h | 10 ++ plugins/core.c | 23 +++ plugins/loader.c | 10 ++ plugins/plugin.h | 15 +++ 4 files changed, 58 inse

[RFC 1/4] docs/tcg-plugins: describe QPP API

2022-09-01 Thread Andrew Fasano
Describe how multiple TCG plugins can interact using the QEMU Plugin-to-Plugin API (QPP) with both callbacks and direct function calls. Signed-off-by: Andrew Fasano --- docs/devel/tcg-plugins.rst | 76 ++ 1 file changed, 76 insertions(+) diff --git a/docs

[RFC 3/4] tcg/plugins: Support for inter-plugin interactions

2022-09-01 Thread Andrew Fasano
is triggered. Signed-off-by: Andrew Fasano --- include/qemu/plugin-qpp.h| 252 +++ plugins/core.c | 11 ++ plugins/loader.c | 24 plugins/plugin.h | 5 + plugins/qemu-plugins.symbols | 1 + 5 files changed, 293

[RFC 4/4] tcg/plugins: Add example pair of QPP plugins

2022-09-01 Thread Andrew Fasano
calls into the two exposed functions in qpp_srv. Signed-off-by: Andrew Fasano --- contrib/plugins/Makefile | 2 ++ contrib/plugins/qpp_client.c | 42 contrib/plugins/qpp_client.h | 1 + contrib/plugins/qpp_srv.c| 33

[RFC 2/4] tcg/plugins: Automatically define CURRENT_PLUGIN

2022-09-01 Thread Andrew Fasano
Use plugin filenames to set the preprocessor variable CURRENT_PLUGIN as a string during plugin compilation. Signed-off-by: Andrew Fasano --- contrib/plugins/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index

[RFC 0/4] Support interactions between TCG plugins

2022-09-01 Thread Andrew Fasano
em like an interface like this would be worth merging? If so, I'd welcome any and all suggestions on how to improve these changes. Thank you, Andrew Fasano Andrew Fasano (4): docs/tcg-plugins: describe QPP API tcg/plugins: Automatically define CURRENT_PLUGIN tcg/plugins: Support for i