]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/book3s64/pkey: Disable pkey on POWER6 and before
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Sun, 26 Jul 2020 13:25:17 +0000 (18:55 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 26 Jul 2020 13:34:18 +0000 (23:34 +1000)
commitf501932d56eb8d4909040f00acd6f8b33c8a7fe2
treee28f223f774d81722d5193d82261e397ebe1688f
parentb0efed2d27a835f4fc9f5b843de866fbadb3dda1
powerpc/book3s64/pkey: Disable pkey on POWER6 and before

POWER6 only supports AMR update via privileged mode (MSR[PR] = 0,
SPRN_AMR=29) The PR=1 (userspace) alias for that SPR (SPRN_AMR=13) was
only supported from POWER7. Since we don't allow userspace modifying
of AMR value we should disable pkey support on P6 and before.

The hypervisor will still report pkey support via
"ibm,processor-storage-keys". Hence also check for P7 CPU_FTR bit to
decide on pkey support.

Fixes: a934645f54a5 ("powerpc/book3s64/pkeys: Simplify the key initialization")
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200726132517.399076-1-aneesh.kumar@linux.ibm.com
arch/powerpc/mm/book3s64/pkeys.c