diff options
Diffstat (limited to 'hw/spapr.c')
-rw-r--r-- | hw/spapr.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/hw/spapr.c b/hw/spapr.c index cca20f9a51..d0bddbce95 100644 --- a/hw/spapr.c +++ b/hw/spapr.c @@ -505,9 +505,9 @@ static void spapr_reset(void *opaque) static void spapr_cpu_reset(void *opaque) { - CPUPPCState *env = opaque; + PowerPCCPU *cpu = opaque; - cpu_state_reset(env); + cpu_reset(CPU(cpu)); } /* pSeries LPAR / sPAPR hardware init */ @@ -518,6 +518,7 @@ static void ppc_spapr_init(ram_addr_t ram_size, const char *initrd_filename, const char *cpu_model) { + PowerPCCPU *cpu; CPUPPCState *env; int i; MemoryRegion *sysmem = get_system_memory(); @@ -560,15 +561,16 @@ static void ppc_spapr_init(ram_addr_t ram_size, cpu_model = kvm_enabled() ? "host" : "POWER7"; } for (i = 0; i < smp_cpus; i++) { - env = cpu_init(cpu_model); - - if (!env) { + cpu = cpu_ppc_init(cpu_model); + if (cpu == NULL) { fprintf(stderr, "Unable to find PowerPC CPU definition\n"); exit(1); } + env = &cpu->env; + /* Set time-base frequency to 512 MHz */ cpu_ppc_tb_init(env, TIMEBASE_FREQ); - qemu_register_reset(spapr_cpu_reset, env); + qemu_register_reset(spapr_cpu_reset, cpu); env->hreset_vector = 0x60; env->hreset_excp_prefix = 0; |