aboutsummaryrefslogtreecommitdiff
path: root/target-openrisc
diff options
context:
space:
mode:
Diffstat (limited to 'target-openrisc')
-rw-r--r--target-openrisc/cpu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target-openrisc/cpu.c b/target-openrisc/cpu.c
index aa269fb7a6..075f00a897 100644
--- a/target-openrisc/cpu.c
+++ b/target-openrisc/cpu.c
@@ -66,10 +66,11 @@ static inline void set_feature(OpenRISCCPU *cpu, int feature)
static void openrisc_cpu_realizefn(DeviceState *dev, Error **errp)
{
- OpenRISCCPU *cpu = OPENRISC_CPU(dev);
+ CPUState *cs = CPU(dev);
OpenRISCCPUClass *occ = OPENRISC_CPU_GET_CLASS(dev);
- cpu_reset(CPU(cpu));
+ qemu_init_vcpu(cs);
+ cpu_reset(cs);
occ->parent_realize(dev, errp);
}