From 926e146eff8d7b89754e8b681f80e962d220f077 Mon Sep 17 00:00:00 2001 From: Pierrick Bouvier Date: Tue, 27 Feb 2024 14:43:21 +0000 Subject: plugins: remove previous n_vcpus functions from API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This information is already accessible using qemu_info_t during plugin install. We will introduce another function (qemu_plugin_num_vcpus) which represent how many cpus were enabled, by tracking new cpu indexes. It's a breaking change, so we bump API version. Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-Id: <20240213094009.150349-2-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240227144335.1196131-16-alex.bennee@linaro.org> --- contrib/plugins/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/plugins/cache.c') diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 9e7ade3b37..c5c8ac75a9 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -767,7 +767,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, policy = LRU; - cores = sys ? qemu_plugin_n_vcpus() : 1; + cores = sys ? info->system.smp_vcpus : 1; for (i = 0; i < argc; i++) { char *opt = argv[i]; -- cgit 1.4.1