aboutsummaryrefslogtreecommitdiff
path: root/include/qemu/plugin.h
diff options
context:
space:
mode:
authorEmilio Cota <cota@braap.org>2023-01-24 18:01:26 +0000
committerAlex Bennée <alex.bennee@linaro.org>2023-02-02 11:48:20 +0000
commit882f5b1b4418cfa8f65ff2be52286247db40d152 (patch)
treeb0a72c44454d8e906011e331bda52bf95274addf /include/qemu/plugin.h
parent17083f6fa6e02326f1c1e8b67b8b282480d013d2 (diff)
downloadqemu-882f5b1b4418cfa8f65ff2be52286247db40d152.zip
qemu-882f5b1b4418cfa8f65ff2be52286247db40d152.tar.gz
qemu-882f5b1b4418cfa8f65ff2be52286247db40d152.tar.bz2
cpu-exec: assert that plugin_mem_cbs is NULL after execution
Fixes: #1381 Signed-off-by: Emilio Cota <cota@braap.org> Message-Id: <20230108165107.62488-1-cota@braap.org> [AJB: manually applied follow-up fix] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230124180127.1881110-35-alex.bennee@linaro.org>
Diffstat (limited to 'include/qemu/plugin.h')
-rw-r--r--include/qemu/plugin.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h
index e0ebede..fb338ba 100644
--- a/include/qemu/plugin.h
+++ b/include/qemu/plugin.h
@@ -59,6 +59,8 @@ get_plugin_meminfo_rw(qemu_plugin_meminfo_t i)
#ifdef CONFIG_PLUGIN
extern QemuOptsList qemu_plugin_opts;
+#define QEMU_PLUGIN_ASSERT(cond) g_assert(cond)
+
static inline void qemu_plugin_add_opts(void)
{
qemu_add_opts(&qemu_plugin_opts);
@@ -250,6 +252,8 @@ void qemu_plugin_user_postfork(bool is_child);
#else /* !CONFIG_PLUGIN */
+#define QEMU_PLUGIN_ASSERT(cond)
+
static inline void qemu_plugin_add_opts(void)
{ }