diff options
Diffstat (limited to 'hw/ppc/spapr_rtas.c')
-rw-r--r-- | hw/ppc/spapr_rtas.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 840d198a8d..652233bdf1 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -47,6 +47,7 @@ #include "trace.h" #include "hw/ppc/fdt.h" #include "target/ppc/mmu-hash64.h" +#include "target/ppc/mmu-book3s-v3.h" static void rtas_display_character(PowerPCCPU *cpu, sPAPRMachineState *spapr, uint32_t token, uint32_t nargs, @@ -165,6 +166,17 @@ static void rtas_start_cpu(PowerPCCPU *callcpu, sPAPRMachineState *spapr, if (!pcc->interrupts_big_endian(callcpu)) { lpcr |= LPCR_ILE; } + if (env->mmu_model == POWERPC_MMU_3_00) { + /* + * New cpus are expected to start in the same radix/hash mode + * as the existing CPUs + */ + if (ppc64_radix_guest(callcpu)) { + lpcr |= LPCR_UPRT | LPCR_GTSE; + } else { + lpcr &= ~(LPCR_UPRT | LPCR_GTSE); + } + } ppc_store_lpcr(newcpu, lpcr); /* |