cpu_target_realize() is misleading, we simply want the host accelerator to realize its things on a vCPU. Rename more generically. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- include/accel/accel-cpu-ops.h | 2 +- accel/accel-common.c | 5 +++-- accel/hvf/hvf-accel-ops.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/accel/accel-cpu-ops.h b/include/accel/accel-cpu-ops.h index 9c07a903ea0..fd1307dad6d 100644 --- a/include/accel/accel-cpu-ops.h +++ b/include/accel/accel-cpu-ops.h @@ -34,7 +34,7 @@ struct AccelOpsClass { /* initialization function called when accel is chosen */ void (*ops_init)(AccelClass *ac); - bool (*cpu_target_realize)(CPUState *cpu, Error **errp); + bool (*cpu_realize)(CPUState *cpu, Error **errp); bool (*cpus_are_resettable)(void); void (*cpu_reset_hold)(CPUState *cpu); diff --git a/accel/accel-common.c b/accel/accel-common.c index ebc103053dc..176b03e0e90 100644 --- a/accel/accel-common.c +++ b/accel/accel-common.c @@ -60,9 +60,10 @@ bool accel_cpu_common_realize(CPUState *cpu, Error **errp) if (acc->cpu_common_realize && !acc->cpu_common_realize(cpu, errp)) { return false; } + + /* specialize with target specific realization */ if (acc->ops - && acc->ops->cpu_target_realize - && !acc->ops->cpu_target_realize(cpu, errp)) { + && acc->ops->cpu_realize && !acc->ops->cpu_realize(cpu, errp)) { return false; } diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index b74a5779c3d..6edc2242ed9 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -356,7 +356,7 @@ static void hvf_accel_ops_class_init(ObjectClass *oc, const void *data) { AccelOpsClass *ops = ACCEL_OPS_CLASS(oc); - ops->cpu_target_realize = hvf_arch_cpu_realize; + ops->cpu_realize = hvf_arch_cpu_realize; ops->create_vcpu_thread = hvf_start_vcpu_thread; ops->kick_vcpu_thread = hvf_kick_vcpu_thread; -- 2.53.0