[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 16/19] accel/hvf: Convert to AccelOpsClass::cpu_thread_routin
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH 16/19] accel/hvf: Convert to AccelOpsClass::cpu_thread_routine |
Date: |
Fri, 6 Jun 2025 18:44:15 +0200 |
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é <philmd@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
- Re: [RFC PATCH 08/19] accel/tcg: Prefer local AccelState over global current_accel(), (continued)
- [RFC PATCH 09/19] accel: Factor accel_cpu_realize() out, Philippe Mathieu-Daudé, 2025/06/06
- [RFC PATCH 10/19] accel/dummy: Factor dummy_thread_precreate() out, Philippe Mathieu-Daudé, 2025/06/06
- [RFC PATCH 12/19] accel: Factor accel_create_vcpu_thread() out, Philippe Mathieu-Daudé, 2025/06/06
- [RFC PATCH 11/19] accel/dummy: Factor tcg_vcpu_thread_precreate() out, Philippe Mathieu-Daudé, 2025/06/06
- [RFC PATCH 13/19] accel: Introduce AccelOpsClass::cpu_thread_routine handler, Philippe Mathieu-Daudé, 2025/06/06
- [RFC PATCH 14/19] accel/dummy: Convert to AccelOpsClass::cpu_thread_routine, Philippe Mathieu-Daudé, 2025/06/06
- [RFC PATCH 15/19] accel/tcg: Convert to AccelOpsClass::cpu_thread_routine, Philippe Mathieu-Daudé, 2025/06/06
- [RFC PATCH 16/19] accel/hvf: Convert to AccelOpsClass::cpu_thread_routine,
Philippe Mathieu-Daudé <=
- [RFC PATCH 17/19] accel/kvm: Convert to AccelOpsClass::cpu_thread_routine, Philippe Mathieu-Daudé, 2025/06/06
- [RFC PATCH 18/19] accel/nvmm: Convert to AccelOpsClass::cpu_thread_routine, Philippe Mathieu-Daudé, 2025/06/06
- [RFC PATCH 19/19] accel/whpx: Convert to AccelOpsClass::cpu_thread_routine, Philippe Mathieu-Daudé, 2025/06/06
- Re: [RFC PATCH 00/19] accel: Preparatory cleanups for split-accel, Alex Bennée, 2025/06/11