[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 16/32] include/qemu: Split out plugin-event.h
From: |
Alex Bennée |
Subject: |
[PATCH v2 16/32] include/qemu: Split out plugin-event.h |
Date: |
Wed, 15 Mar 2023 17:43:15 +0000 |
From: Richard Henderson <richard.henderson@linaro.org>
The usage in hw/core/cpu.h only requires QEMU_PLUGIN_EV_MAX.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230310195252.210956-7-richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
include/hw/core/cpu.h | 2 +-
include/qemu/plugin-event.h | 26 ++++++++++++++++++++++++++
include/qemu/plugin.h | 17 +----------------
3 files changed, 28 insertions(+), 17 deletions(-)
create mode 100644 include/qemu/plugin-event.h
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 75689bff02..821e937020 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -30,7 +30,7 @@
#include "qemu/rcu_queue.h"
#include "qemu/queue.h"
#include "qemu/thread.h"
-#include "qemu/plugin.h"
+#include "qemu/plugin-event.h"
#include "qom/object.h"
typedef int (*WriteCoreDumpFunction)(const void *buf, size_t size,
diff --git a/include/qemu/plugin-event.h b/include/qemu/plugin-event.h
new file mode 100644
index 0000000000..7056d8427b
--- /dev/null
+++ b/include/qemu/plugin-event.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2017, Emilio G. Cota <cota@braap.org>
+ *
+ * License: GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#ifndef QEMU_PLUGIN_EVENT_H
+#define QEMU_PLUGIN_EVENT_H
+
+/*
+ * Events that plugins can subscribe to.
+ */
+enum qemu_plugin_event {
+ QEMU_PLUGIN_EV_VCPU_INIT,
+ QEMU_PLUGIN_EV_VCPU_EXIT,
+ QEMU_PLUGIN_EV_VCPU_TB_TRANS,
+ QEMU_PLUGIN_EV_VCPU_IDLE,
+ QEMU_PLUGIN_EV_VCPU_RESUME,
+ QEMU_PLUGIN_EV_VCPU_SYSCALL,
+ QEMU_PLUGIN_EV_VCPU_SYSCALL_RET,
+ QEMU_PLUGIN_EV_FLUSH,
+ QEMU_PLUGIN_EV_ATEXIT,
+ QEMU_PLUGIN_EV_MAX, /* total number of plugin events we support */
+};
+
+#endif /* QEMU_PLUGIN_EVENT_H */
diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h
index e0ebedef84..6bf4bce188 100644
--- a/include/qemu/plugin.h
+++ b/include/qemu/plugin.h
@@ -12,24 +12,9 @@
#include "qemu/error-report.h"
#include "qemu/queue.h"
#include "qemu/option.h"
+#include "qemu/plugin-event.h"
#include "exec/memopidx.h"
-/*
- * Events that plugins can subscribe to.
- */
-enum qemu_plugin_event {
- QEMU_PLUGIN_EV_VCPU_INIT,
- QEMU_PLUGIN_EV_VCPU_EXIT,
- QEMU_PLUGIN_EV_VCPU_TB_TRANS,
- QEMU_PLUGIN_EV_VCPU_IDLE,
- QEMU_PLUGIN_EV_VCPU_RESUME,
- QEMU_PLUGIN_EV_VCPU_SYSCALL,
- QEMU_PLUGIN_EV_VCPU_SYSCALL_RET,
- QEMU_PLUGIN_EV_FLUSH,
- QEMU_PLUGIN_EV_ATEXIT,
- QEMU_PLUGIN_EV_MAX, /* total number of plugin events we support */
-};
-
/*
* Option parsing/processing.
* Note that we can load an arbitrary number of plugins.
--
2.39.2
- [PATCH v2 03/32] scripts/ci: add libslirp-devel to build-environment, (continued)
- [PATCH v2 03/32] scripts/ci: add libslirp-devel to build-environment, Alex Bennée, 2023/03/15
- [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 <=
- [PATCH v2 17/32] include/qemu/plugin: Inline qemu_plugin_disable_mem_helpers, Alex Bennée, 2023/03/15
- [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