cpu: call plugin init hook asynchronously
commit81cf548f533b4f9e1dc58414f081c2530e08fa48
authorPierrick Bouvier <pierrick.bouvier@linaro.org>
Tue, 27 Feb 2024 14:43:25 +0000 (27 14:43 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 28 Feb 2024 09:11:40 +0000 (28 09:11 +0000)
tree390ea63c11ece77aff72809b6567c6beca05928e
parentf2e8d2d89954ed3d9603c904aaad1264cf250551
cpu: call plugin init hook asynchronously

This ensures we run during a cpu_exec, which allows to call start/end
exclusive from this init hook (needed for new scoreboard API introduced
later).

async work is run before any tb is translated/executed, so we can
guarantee plugin init will be called before any other hook.

The previous change made sure that any idle/resume cb call will not be
done before initializing plugin for a given vcpu.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20240213094009.150349-5-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240227144335.1196131-20-alex.bennee@linaro.org>
hw/core/cpu-common.c