From: Phil Dennis-Jordan <phil@philjordan.eu>
Some VM state required for fully configuring vCPUs is only available
after all devices have been through their init phase. This extra
function, called just before each vCPU makes its first VM entry,
allows us to perform such architecture-specific initialisation.
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
---
accel/hvf/hvf-accel-ops.c | 5 +++++
include/sysemu/hvf_int.h | 1 +
target/arm/hvf/hvf.c | 4 ++++
target/i386/hvf/hvf.c | 4 ++++
4 files changed, 14 insertions(+)
diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c
index d60874d3e6..c17a9a10de 100644
--- a/accel/hvf/hvf-accel-ops.c
+++ b/accel/hvf/hvf-accel-ops.c
@@ -442,6 +442,11 @@ static void *hvf_cpu_thread_fn(void *arg)
cpu_thread_signal_created(cpu);
qemu_guest_random_seed_thread_part2(cpu->random_seed);
+ if (!cpu_can_run(cpu)) {
+ qemu_wait_io_event(cpu);
+ }
+ hvf_vcpu_before_first_run(cpu);