diff options
Diffstat (limited to 'target/ppc/translate_init.c')
-rw-r--r-- | target/ppc/translate_init.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index 783bf98217..b325c2cce6 100644 --- a/target/ppc/translate_init.c +++ b/target/ppc/translate_init.c @@ -8435,7 +8435,7 @@ static void getset_compat_deprecated(Object *obj, Visitor *v, const char *name, visit_type_null(v, name, NULL); } -static PropertyInfo ppc_compat_deprecated_propinfo = { +static const PropertyInfo ppc_compat_deprecated_propinfo = { .name = "str", .description = "compatibility mode (deprecated)", .get = getset_compat_deprecated, @@ -9011,8 +9011,16 @@ void cpu_ppc_set_papr(PowerPCCPU *cpu, PPCVirtualHypervisor *vhyp) /* By default we choose legacy mode and switch to new hash or radix * when a register process table hcall is made. So disable process * tables and guest translation shootdown by default + * + * Hot-plugged CPUs inherit from the guest radix setting under + * KVM but not under TCG. Update the default LPCR to keep new + * CPUs in sync when radix is enabled. */ - lpcr->default_value &= ~(LPCR_UPRT | LPCR_GTSE); + if (ppc64_radix_guest(cpu)) { + lpcr->default_value |= LPCR_UPRT | LPCR_GTSE; + } else { + lpcr->default_value &= ~(LPCR_UPRT | LPCR_GTSE); + } lpcr->default_value |= LPCR_PDEE | LPCR_HDEE | LPCR_EEE | LPCR_DEE | LPCR_OEE; break; |