On 7/2/25 16:45, Igor Mammedov wrote:
On Tue, 28 Jan 2025 15:21:43 +0100
Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> wrote:
Hi,
The goal of this series is to expose vCPUs in a stable state
to the accelerators, in particular the QDev 'REALIZED' step.
I'll take some of your patches (with Richard's feedback fixed),
and respin series focusing mostly on realize part.
Great, thank you for helping!
(and drop wire/unwire parts, reshuffling cpu code instead)
To do so we split the QTAILQ_INSERT/REMOVE calls from
cpu_list_add() / cpu_list_remove(), by moving them to the
DeviceClass::[un]wire() handlers, guaranty to be called just
before a vCPU is exposed to the guest, as "realized".
First we have to modify how &first_cpu is used in TCG round
robin implementation, and ensure we invalidate the TB jmpcache
with &qemu_cpu_list locked.
I'm really out of my comfort zone here, so posting as RFC. At
least all test suite is passing...
I expect these changes to allow CPUState::cpu_index clarifications
and simplifications, but this will be addressed (and commented) in
a separate series.
Regards,
Phil.