powerpc/sstep: Check instruction validity against ISA version before emulation
authorAnanth N Mavinakayanahalli <ananth@linux.ibm.com>
Mon, 25 Jan 2021 13:06:22 +0000 (18:36 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 30 Jan 2021 00:39:34 +0000 (11:39 +1100)
commit8813ff49607eab3caaf40fe8929b0ce7dc68e85f
treedeb42488a0e6a1b0abe0cdb416c88538ed36f7f6
parent4eeef098b43242ed145c83fba9989d586d707589
powerpc/sstep: Check instruction validity against ISA version before emulation

We currently unconditionally try to emulate newer instructions on older
Power versions that could cause issues. Gate it.

Fixes: 350779a29f11 ("powerpc: Handle most loads and stores in instruction emulation code")
Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/161157995977.64773.13794501093457185080.stgit@thinktux.local
arch/powerpc/lib/sstep.c