aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPierrick Bouvier <pierrick.bouvier@linaro.org>2024-02-27 14:43:22 +0000
committerAlex Bennée <alex.bennee@linaro.org>2024-02-28 09:11:36 +0000
commit4a448b148ca076d80a41addd4fc1e49497cb23c8 (patch)
tree73b2d9122e8921d125dabe0b94019751f7d570b1 /include
parent926e146eff8d7b89754e8b681f80e962d220f077 (diff)
plugins: add qemu_plugin_num_vcpus function
We now keep track of how many vcpus were started. This way, a plugin can easily query number of any vcpus at any point of execution, which unifies user and system mode workflows. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240213094009.150349-3-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240227144335.1196131-17-alex.bennee@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/qemu-plugin.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h
index e45181c793..93981f8f89 100644
--- a/include/qemu/qemu-plugin.h
+++ b/include/qemu/qemu-plugin.h
@@ -645,6 +645,9 @@ QEMU_PLUGIN_API
void qemu_plugin_register_atexit_cb(qemu_plugin_id_t id,
qemu_plugin_udata_cb_t cb, void *userdata);
+/* returns how many vcpus were started at this point */
+int qemu_plugin_num_vcpus(void);
+
/**
* qemu_plugin_outs() - output string via QEMU's logging system
* @string: a string