mips: call cpu_mips_realize_env() from mips_cpu_realizefn()

This changes the order between cpu_mips_realize_env() and
cpu_exec_initfn(), but cpu_exec_initfn() don't have anything that
depends on cpu_mips_realize_env() being called first.

Backports commit df4dc10284e1d871db8adb512816a561473ffe3e from qemu
This commit is contained in:
Philippe Mathieu-Daudé 2018-03-05 00:29:51 -05:00 committed by Lioncash
parent 3257a8f8c3
commit 4729b633f1
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
2 changed files with 3 additions and 2 deletions

View file

@ -108,8 +108,11 @@ static void mips_cpu_reset(CPUState *s)
static int mips_cpu_realizefn(struct uc_struct *uc, DeviceState *dev, Error **errp)
{
CPUState *cs = CPU(dev);
MIPSCPU *cpu = MIPS_CPU(uc, dev);
MIPSCPUClass *mcc = MIPS_CPU_GET_CLASS(uc, dev);
cpu_mips_realize_env(&cpu->env);
cpu_reset(cs);
qemu_init_vcpu(cs);

View file

@ -20740,8 +20740,6 @@ MIPSCPU *cpu_mips_init(struct uc_struct *uc, const char *cpu_model)
env = &cpu->env;
env->cpu_model = def;
cpu_mips_realize_env(env);
object_property_set_bool(uc, OBJECT(cpu), true, "realized", NULL);
return cpu;