diff options
author | Pierrick Bouvier <pierrick.bouvier@linaro.org> | 2024-02-27 14:43:22 +0000 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2024-02-28 09:11:36 +0000 |
commit | 4a448b148ca076d80a41addd4fc1e49497cb23c8 (patch) | |
tree | 73b2d9122e8921d125dabe0b94019751f7d570b1 /plugins/plugin.h | |
parent | 926e146eff8d7b89754e8b681f80e962d220f077 (diff) | |
download | qemu-4a448b148ca076d80a41addd4fc1e49497cb23c8.zip qemu-4a448b148ca076d80a41addd4fc1e49497cb23c8.tar.gz qemu-4a448b148ca076d80a41addd4fc1e49497cb23c8.tar.bz2 |
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 'plugins/plugin.h')
-rw-r--r-- | plugins/plugin.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/plugin.h b/plugins/plugin.h index 90f3f32..00b3509 100644 --- a/plugins/plugin.h +++ b/plugins/plugin.h @@ -44,6 +44,8 @@ struct qemu_plugin_state { * the code cache is flushed. */ struct qht dyn_cb_arr_ht; + /* How many vcpus were started */ + int num_vcpus; }; @@ -97,4 +99,6 @@ void plugin_register_vcpu_mem_cb(GArray **arr, void exec_inline_op(struct qemu_plugin_dyn_cb *cb); +int plugin_num_vcpus(void); + #endif /* PLUGIN_H */ |