Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion qemu/target/ppc/translate_init.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -10140,6 +10140,7 @@ static void ppc_cpu_reset(CPUState *dev)
}
#endif

env->msr |= MSR_HVB; // alter_hv only does anything if MSR_HVB is already set
hreg_store_msr(env, msr, 1);

env->nip = env->hreset_vector | env->excp_prefix;
Expand Down Expand Up @@ -11024,11 +11025,12 @@ PowerPCCPU *cpu_ppc_init(struct uc_struct *uc)
memset(cpu, 0, sizeof(*cpu));
#ifdef TARGET_PPC64
if (uc->cpu_model == INT_MAX) {
uc->cpu_model = UC_CPU_PPC64_POWER10_V1_0 + UC_CPU_PPC32_7457A_V1_2 + 1; // power10_v1.0
uc->cpu_model = UC_CPU_PPC64_POWER10_V1_0; // power10_v1.0
} else if (uc->cpu_model + UC_CPU_PPC32_7457A_V1_2 + 1 >= ARRAY_SIZE(ppc_cpus)) {
free(cpu);
return NULL;
}
uc->cpu_model += UC_CPU_PPC32_7457A_V1_2 + 1; // PPC64 models come after PPC32
#else
if (uc->cpu_model == INT_MAX) {
uc->cpu_model = UC_CPU_PPC32_7457A_V1_2; // 7457a_v1.2
Expand Down