History

powerpc/64: Disable use of radix under a hypervisor

Currently, if the kernel is running on a POWER9 processor under a hypervisor, it may try to use the radix MMU even though it doesn't have the necessary code to do so (it doesn't negotiate use of radix, and it doesn't do the H_REGISTER_PROC_TBL hcall). If the hypervisor supports both radix and HPT, then it will set up the guest to use HPT (since the guest doesn't request radix in the CAS call), but if the radix feature bit is set in the ibm,pa-features property (which is valid, since ibm,pa-features is defined to represent the capabilities of the processor) the guest will try to use radix, resulting in a crash when it turns the MMU on. This makes the minimal fix for the current code, which is to disable radix unless we are running in hypervisor mode.

Paul Mackerras committed 9 years ago

Commit 3f91a891 parent f83e6861 file · +2 −1Browse files

Unified · Split

arch/powerpc/mm/init_64.c+2−1
@@ -347,7 +347,8 @@ early_param("disable_radix", parse_disable_radix); · 346 unmodified lines
347347 void __init mmu_early_init_devtree(void)
348348 {
349349 /* Disable radix mode based on kernel command line. */
350− if (disable_radix)
350+ /* We don't yet have the machinery to do radix as a guest. */
351+ if (disable_radix || !(mfmsr() & MSR_HV))
351352 cur_cpu_spec->mmu_features &= ~MMU_FTR_TYPE_RADIX;
352353
353354 if (early_radix_enabled())

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t