[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 17/32] include/qemu/plugin: Inline qemu_plugin_disable_mem_hel
From: |
Alex Bennée |
Subject: |
[PATCH v2 17/32] include/qemu/plugin: Inline qemu_plugin_disable_mem_helpers |
Date: |
Wed, 15 Mar 2023 17:43:16 +0000 |
From: Richard Henderson <richard.henderson@linaro.org>
Now that we've broken the include loop with cpu.h,
we can bring this inline.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230310195252.210956-8-richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
include/qemu/plugin.h | 6 +++++-
plugins/core.c | 11 -----------
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h
index 6bf4bce188..bc0781cab8 100644
--- a/include/qemu/plugin.h
+++ b/include/qemu/plugin.h
@@ -14,6 +14,7 @@
#include "qemu/option.h"
#include "qemu/plugin-event.h"
#include "exec/memopidx.h"
+#include "hw/core/cpu.h"
/*
* Option parsing/processing.
@@ -204,7 +205,10 @@ void qemu_plugin_atexit_cb(void);
void qemu_plugin_add_dyn_cb_arr(GArray *arr);
-void qemu_plugin_disable_mem_helpers(CPUState *cpu);
+static inline void qemu_plugin_disable_mem_helpers(CPUState *cpu)
+{
+ cpu->plugin_mem_cbs = NULL;
+}
/**
* qemu_plugin_user_exit(): clean-up callbacks before calling exit callbacks
diff --git a/plugins/core.c b/plugins/core.c
index 04632886b9..9912f2cfdb 100644
--- a/plugins/core.c
+++ b/plugins/core.c
@@ -553,17 +553,6 @@ void qemu_plugin_user_postfork(bool is_child)
}
}
-
-/*
- * Call this function after longjmp'ing to the main loop. It's possible that
the
- * last instruction of a TB might have used helpers, and therefore the
- * "disable" instruction will never execute because it ended up as dead code.
- */
-void qemu_plugin_disable_mem_helpers(CPUState *cpu)
-{
- cpu->plugin_mem_cbs = NULL;
-}
-
static bool plugin_dyn_cb_arr_cmp(const void *ap, const void *bp)
{
return ap == bp;
--
2.39.2
- [PATCH v2 04/32] scripts/ci: update gitlab-runner playbook to handle CentOS, (continued)
- [PATCH v2 04/32] scripts/ci: update gitlab-runner playbook to handle CentOS, Alex Bennée, 2023/03/15
- [PATCH v2 05/32] gitlab: update centos-8-stream job, Alex Bennée, 2023/03/15
- [PATCH v2 07/32] tests/tcg: add some help output for running individual tests, Alex Bennée, 2023/03/15
- [PATCH v2 06/32] include/qemu: add documentation for memory callbacks, Alex Bennée, 2023/03/15
- [PATCH v2 15/32] *: Add missing includes of qemu/plugin.h, Alex Bennée, 2023/03/15
- [PATCH v2 14/32] *: Add missing includes of qemu/error-report.h, Alex Bennée, 2023/03/15
- [PATCH v2 16/32] include/qemu: Split out plugin-event.h, Alex Bennée, 2023/03/15
- [PATCH v2 17/32] include/qemu/plugin: Inline qemu_plugin_disable_mem_helpers,
Alex Bennée <=
- [PATCH v2 18/32] iotests: explicitly pass source/build dir to 'check' command, Alex Bennée, 2023/03/15
- [PATCH v2 19/32] iotests: allow test discovery before building, Alex Bennée, 2023/03/15
- [PATCH v2 24/32] iotests: register each I/O test separately with meson, Alex Bennée, 2023/03/15
- [PATCH v2 20/32] iotests: strip subdir path when listing tests, Alex Bennée, 2023/03/15
- [PATCH v2 21/32] iotests: print TAP protocol version when reporting tests, Alex Bennée, 2023/03/15
- [PATCH v2 26/32] contrib/gitdm: Add ASPEED Technology to the domain map, Alex Bennée, 2023/03/15
- [PATCH v2 27/32] contrib/gitdm: Add SYRMIA to the domain map, Alex Bennée, 2023/03/15
- [PATCH v2 32/32] contrib/gitdm: add group map for AMD, Alex Bennée, 2023/03/15
- [PATCH v2 12/32] tcg: Drop plugin_gen_disable_mem_helpers from tcg_gen_exit_tb, Alex Bennée, 2023/03/15
- [PATCH v2 30/32] contrib/gitdm: add revng to domain map, Alex Bennée, 2023/03/15