lkml.org 
[lkml]   [2018]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 02/37] powerpc/64s: Clear PCR on boot
    Date
    4.4-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Michael Neuling <mikey@neuling.org>

    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 | 4 ++++
    1 file changed, 4 insertions(+)

    --- a/arch/powerpc/kernel/cpu_setup_power.S
    +++ b/arch/powerpc/kernel/cpu_setup_power.S
    @@ -27,6 +27,7 @@ _GLOBAL(__setup_cpu_power7)
    beqlr
    li r0,0
    mtspr SPRN_LPID,r0
    + mtspr SPRN_PCR,r0
    mfspr r3,SPRN_LPCR
    bl __init_LPCR
    bl __init_tlb_power7
    @@ -40,6 +41,7 @@ _GLOBAL(__restore_cpu_power7)
    beqlr
    li r0,0
    mtspr SPRN_LPID,r0
    + mtspr SPRN_PCR,r0
    mfspr r3,SPRN_LPCR
    bl __init_LPCR
    bl __init_tlb_power7
    @@ -55,6 +57,7 @@ _GLOBAL(__setup_cpu_power8)
    beqlr
    li r0,0
    mtspr SPRN_LPID,r0
    + mtspr SPRN_PCR,r0
    mfspr r3,SPRN_LPCR
    ori r3, r3, LPCR_PECEDH
    bl __init_LPCR
    @@ -74,6 +77,7 @@ _GLOBAL(__restore_cpu_power8)
    beqlr
    li r0,0
    mtspr SPRN_LPID,r0
    + mtspr SPRN_PCR,r0
    mfspr r3,SPRN_LPCR
    ori r3, r3, LPCR_PECEDH
    bl __init_LPCR

    \
     
     \ /
      Last update: 2018-06-05 19:28    [W:4.915 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site