]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64: Disable use of radix under a hypervisor
authorPaul Mackerras <paulus@ozlabs.org>
Thu, 16 Feb 2017 02:49:21 +0000 (13:49 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 16 Feb 2017 03:01:42 +0000 (14:01 +1100)
commitfbffd061d900f9f093ceaf269f326fe96b94005f
treed0aaa3ba075243d50bd68975e4e2ff21185274f5
parent1f9400672e2669d489ca712d9b319569dd044485
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.

Fixes: 0fe690ad9db8 ("powerpc/mm/radix: Add radix callbacks for early init routines")
Cc: stable@vger.kernel.org # v4.7+
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/init_64.c