accel: Rename AccelCPUClass::cpu_realizefn() -> cpu_target_realize()
The AccelCPUClass::cpu_realizefn handler is meant for target specific code, rename it using '_target_' to emphasis it. Suggested-by: Claudio Fontana <cfontana@suse.de> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20231003123026.99229-3-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
e5dc722ca9
commit
6294e502a9
@ -123,8 +123,8 @@ bool accel_cpu_realize(CPUState *cpu, Error **errp)
|
||||
{
|
||||
CPUClass *cc = CPU_GET_CLASS(cpu);
|
||||
|
||||
if (cc->accel_cpu && cc->accel_cpu->cpu_realizefn) {
|
||||
return cc->accel_cpu->cpu_realizefn(cpu, errp);
|
||||
if (cc->accel_cpu && cc->accel_cpu->cpu_target_realize) {
|
||||
return cc->accel_cpu->cpu_target_realize(cpu, errp);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ typedef struct AccelCPUClass {
|
||||
|
||||
void (*cpu_class_init)(CPUClass *cc);
|
||||
void (*cpu_instance_init)(CPUState *cpu);
|
||||
bool (*cpu_realizefn)(CPUState *cpu, Error **errp);
|
||||
bool (*cpu_target_realize)(CPUState *cpu, Error **errp);
|
||||
} AccelCPUClass;
|
||||
|
||||
#endif /* ACCEL_CPU_H */
|
||||
|
@ -77,7 +77,7 @@ static void hvf_cpu_accel_class_init(ObjectClass *oc, void *data)
|
||||
{
|
||||
AccelCPUClass *acc = ACCEL_CPU_CLASS(oc);
|
||||
|
||||
acc->cpu_realizefn = host_cpu_realizefn;
|
||||
acc->cpu_target_realize = host_cpu_realizefn;
|
||||
acc->cpu_instance_init = hvf_cpu_instance_init;
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ static void kvm_cpu_accel_class_init(ObjectClass *oc, void *data)
|
||||
{
|
||||
AccelCPUClass *acc = ACCEL_CPU_CLASS(oc);
|
||||
|
||||
acc->cpu_realizefn = kvm_cpu_realizefn;
|
||||
acc->cpu_target_realize = kvm_cpu_realizefn;
|
||||
acc->cpu_instance_init = kvm_cpu_instance_init;
|
||||
}
|
||||
static const TypeInfo kvm_cpu_accel_type_info = {
|
||||
|
@ -163,7 +163,7 @@ static void tcg_cpu_accel_class_init(ObjectClass *oc, void *data)
|
||||
AccelCPUClass *acc = ACCEL_CPU_CLASS(oc);
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
acc->cpu_realizefn = tcg_cpu_realizefn;
|
||||
acc->cpu_target_realize = tcg_cpu_realizefn;
|
||||
#endif /* CONFIG_USER_ONLY */
|
||||
|
||||
acc->cpu_class_init = tcg_cpu_class_init;
|
||||
|
Loading…
Reference in New Issue
Block a user