summaryrefslogtreecommitdiffstats
path: root/tests/plugin/mem.c
diff options
context:
space:
mode:
authorAlex Bennée2019-11-04 14:18:36 +0100
committerAlex Bennée2019-11-12 15:32:55 +0100
commit3fb356cc86461a14450802e14fa79e8436dbbf31 (patch)
tree1fa66d329a0031fcdc7b7ac7117bdf921236a1d8 /tests/plugin/mem.c
parent.travis.yml: don't run make check with multiple jobs (diff)
downloadqemu-3fb356cc86461a14450802e14fa79e8436dbbf31.tar.gz
qemu-3fb356cc86461a14450802e14fa79e8436dbbf31.tar.xz
qemu-3fb356cc86461a14450802e14fa79e8436dbbf31.zip
tcg plugins: expose an API version concept
This is a very simple versioning API which allows the plugin infrastructure to check the API a plugin was built against. We also expose a min/cur API version to the plugin via the info block in case it wants to avoid using old deprecated APIs in the future. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Robert Foley <robert.foley@linaro.org>
Diffstat (limited to 'tests/plugin/mem.c')
-rw-r--r--tests/plugin/mem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/plugin/mem.c b/tests/plugin/mem.c
index d967388989..878abf09d1 100644
--- a/tests/plugin/mem.c
+++ b/tests/plugin/mem.c
@@ -14,6 +14,8 @@
#include <qemu-plugin.h>
+QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION;
+
static uint64_t mem_count;
static uint64_t io_count;
static bool do_inline;