Similarly to
1d78a3c3ab8 for KVM, wrap hv_vcpu_run() with
cpu_exec_start/end(), so that the accelerator can perform
pending operations while all vCPUs are quiescent. See also
explanation in commit
c265e976f46 ("cpus-common: lock-free
fast path for cpu_exec_start/end").
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
}
bql_unlock();
+ cpu_exec_start(cpu);
r = hv_vcpu_run(cpu->accel->fd);
+ cpu_exec_end(cpu);
bql_lock();
switch (r) {
case HV_SUCCESS:
return EXCP_HLT;
}
+ cpu_exec_start(cpu);
+
hv_return_t r = hv_vcpu_run_until(cpu->accel->fd, HV_DEADLINE_FOREVER);
assert_hvf_ok(r);
+ cpu_exec_end(cpu);
+
ret = hvf_handle_vmexit(cpu);
} while (ret == 0);