On 29/03/21 10:05, Pavel Dovgalyuk wrote:
@@ -136,7 +137,13 @@ void do_run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data, { struct qemu_work_item wi;- if (qemu_cpu_is_self(cpu)) {+ if (qemu_cpu_is_self(cpu) + /* + * vCPU thread is waiting when replay mutex is locked + * and the task is not exclusive, the function may be called + * without other synchronization. + */ + || (replay_mode != REPLAY_MODE_NONE && replay_mutex_locked())) { func(cpu, data); return; }
Is the "or" saying that the execution is using the lockstep mode? If so, can you put it in a separate function so that it's more self-explanatory and check if it should be used elsewhere?
Thanks, Paolo
