mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
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>
This commit is contained in:
parent
926e146eff
commit
4a448b148c
5 changed files with 19 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue