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> --- target/i386/whpx/whpx-accel-ops.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/target/i386/whpx/whpx-accel-ops.c b/target/i386/whpx/whpx-accel-ops.c index b8bebe403c9..c1b27d1b89d 100644 --- a/target/i386/whpx/whpx-accel-ops.c +++ b/target/i386/whpx/whpx-accel-ops.c @@ -61,16 +61,6 @@ static void *whpx_cpu_thread_fn(void *arg) return NULL; } -static void whpx_start_vcpu_thread(CPUState *cpu) -{ - char thread_name[VCPU_THREAD_NAME_SIZE]; - - snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/WHPX", - cpu->cpu_index); - qemu_thread_create(cpu->thread, thread_name, whpx_cpu_thread_fn, - cpu, QEMU_THREAD_JOINABLE); -} - static void whpx_kick_vcpu_thread(CPUState *cpu) { if (!qemu_cpu_is_self(cpu)) { @@ -87,7 +77,7 @@ static void whpx_accel_ops_class_init(ObjectClass *oc, const void *data) { AccelOpsClass *ops = ACCEL_OPS_CLASS(oc); - ops->create_vcpu_thread = whpx_start_vcpu_thread; + ops->cpu_thread_routine = whpx_cpu_thread_fn; ops->kick_vcpu_thread = whpx_kick_vcpu_thread; ops->cpu_thread_is_idle = whpx_vcpu_thread_is_idle; -- 2.49.0