On 12/03/21 12:51, Claudio Fontana wrote:
seems to me we already have, as the accel class init, fe, for x86/tcg:
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;
#endif /* CONFIG_USER_ONLY */
acc->cpu_class_init = tcg_cpu_class_init;
acc->cpu_instance_init = tcg_cpu_instance_init;
}
acc->cpu_class_init() call would then be the acc->init_cpu call you mention.
The only thing we seem to be missing is the cc->init_tcg_ops(cc)..
Yes, called by tcg_cpu_class_init or tcg_cpu_instance_init.
Paolo