By converting to AccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> --- accel/hvf/hvf-accel-ops.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index f4a983d1328..d9b533820c5 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -458,22 +458,6 @@ static void *hvf_cpu_thread_fn(void *arg) return NULL; } -static void hvf_start_vcpu_thread(CPUState *cpu) -{ - char thread_name[VCPU_THREAD_NAME_SIZE]; - - /* - * HVF currently does not support TCG, and only runs in - * unrestricted-guest mode. - */ - assert(hvf_enabled()); - - snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/HVF", - cpu->cpu_index); - qemu_thread_create(cpu->thread, thread_name, hvf_cpu_thread_fn, - cpu, QEMU_THREAD_JOINABLE); -} - static int hvf_insert_breakpoint(CPUState *cpu, int type, vaddr addr, vaddr len) { struct hvf_sw_breakpoint *bp; @@ -580,7 +564,7 @@ static void hvf_accel_ops_class_init(ObjectClass *oc, const void *data) { AccelOpsClass *ops = ACCEL_OPS_CLASS(oc); - ops->create_vcpu_thread = hvf_start_vcpu_thread; + ops->cpu_thread_routine = hvf_cpu_thread_fn, ops->kick_vcpu_thread = hvf_kick_vcpu_thread; ops->synchronize_post_reset = hvf_cpu_synchronize_post_reset; -- 2.49.0