plugins: remove special casing for cpu->realized

Now the condition variable is initialised early on we don't need to go
through hoops to avoid calling async_run_on_cpu.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20240530194250.1801701-5-alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
Alex Bennée 2024-05-30 20:42:49 +01:00 committed by Philippe Mathieu-Daudé
parent 39e4bc4cdf
commit 2fa16246dd

View File

@ -65,11 +65,7 @@ static void plugin_cpu_update__locked(gpointer k, gpointer v, gpointer udata)
CPUState *cpu = container_of(k, CPUState, cpu_index); CPUState *cpu = container_of(k, CPUState, cpu_index);
run_on_cpu_data mask = RUN_ON_CPU_HOST_ULONG(*plugin.mask); run_on_cpu_data mask = RUN_ON_CPU_HOST_ULONG(*plugin.mask);
if (DEVICE(cpu)->realized) { async_run_on_cpu(cpu, plugin_cpu_update__async, mask);
async_run_on_cpu(cpu, plugin_cpu_update__async, mask);
} else {
plugin_cpu_update__async(cpu, mask);
}
} }
void plugin_unregister_cb__locked(struct qemu_plugin_ctx *ctx, void plugin_unregister_cb__locked(struct qemu_plugin_ctx *ctx,