powerpc/64s: Clear PCR on boot
authorMichael Neuling <mikey@neuling.org>
Fri, 18 May 2018 01:37:42 +0000 (11:37 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Jun 2018 14:44:32 +0000 (16:44 +0200)
commit09ae0d2ec919b2cf2e6f7dd4be034b060f12c18f
treee3b29c5753572cab75d3d2247475eab820518188
parentb27fb13e93b0b41d56706c1a577759ab69d80a3f
powerpc/64s: Clear PCR on boot

commit faf37c44a105f3608115785f17cbbf3500f8bc71 upstream.

Clear the PCR (Processor Compatibility Register) on boot to ensure we
are not running in a compatibility mode.

We've seen this cause problems when a crash (and kdump) occurs while
running compat mode guests. The kdump kernel then runs with the PCR
set and causes problems. The symptom in the kdump kernel (also seen in
petitboot after fast-reboot) is early userspace programs taking
sigills on newer instructions (seen in libc).

Signed-off-by: Michael Neuling <mikey@neuling.org>
Cc: stable@vger.kernel.org
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/cpu_setup_power.S