powerpc: Handle exceptions caused by pkey violation
authorRam Pai <linuxram@us.ibm.com>
Fri, 19 Jan 2018 01:50:40 +0000 (17:50 -0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 20 Jan 2018 11:59:04 +0000 (22:59 +1100)
commite6c2a4797e101a25eced94aa9e1fc42c30247aec
tree97ab4186d328b99f469a0252f419a2f692524139
parent1137573acfe4c67cdd265bbfbd2d66ebe87d6325
powerpc: Handle exceptions caused by pkey violation

Handle Data and  Instruction exceptions caused by memory
protection-key.

The CPU will detect the key fault if the HPTE is already
programmed with the key.

However if the HPTE is not  hashed, a key fault will not
be detected by the hardware. The software will detect
pkey violation in such a case.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/reg.h
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/mm/fault.c