diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-04-01 07:50:36 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-04-03 13:50:08 +0200 |
commit | 252988cbf037f3d446eea222afb46cc134d32c71 (patch) | |
tree | 06ef89cd7dbc79de88ce5a27cc8ce05d751a7bda /arch/powerpc/include/asm/security_features.h | |
parent | KVM: PPC: Book3S HV: Fix ppc_breakpoint_available compile error (diff) | |
download | linux-252988cbf037f3d446eea222afb46cc134d32c71.tar.xz linux-252988cbf037f3d446eea222afb46cc134d32c71.zip |
powerpc: Don't write to DABR on >= Power8 if DAWR is disabled
flush_thread() calls __set_breakpoint() via set_debug_reg_defaults()
without checking ppc_breakpoint_available(). On Power8 or later CPUs
which have the DAWR feature disabled that will cause a write to the
DABR which is incorrect as those CPUs don't have a DABR.
Fix it two ways, by checking ppc_breakpoint_available() in
set_debug_reg_defaults(), and also by reworking __set_breakpoint() to
only write to DABR on Power7 or earlier.
Fixes: 9654153158d3 ("powerpc: Disable DAWR in the base POWER9 CPU features")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Rework the logic in __set_breakpoint()]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/security_features.h')
0 files changed, 0 insertions, 0 deletions