aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/processor.h
diff options
context:
space:
mode:
authorGravatar Ram Pai <linuxram@us.ibm.com> 2018-01-18 17:50:31 -0800
committerGravatar Michael Ellerman <mpe@ellerman.id.au> 2018-01-20 22:59:00 +1100
commit06bb53b33804613627c7ca1eda246459a7be2803 (patch)
tree61428a22fe89565f607bf32480a6173255fb8c7b /arch/powerpc/include/asm/processor.h
parentpowerpc: ability to create execute-disabled pkeys (diff)
downloadlinux-06bb53b33804613627c7ca1eda246459a7be2803.tar.gz
linux-06bb53b33804613627c7ca1eda246459a7be2803.tar.bz2
linux-06bb53b33804613627c7ca1eda246459a7be2803.zip
powerpc: store and restore the pkey state across context switches
Store and restore the AMR, IAMR and UAMOR register state of the task before scheduling out and after scheduling in, respectively. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/processor.h')
-rw-r--r--arch/powerpc/include/asm/processor.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index bdab3b74eb98..01299cdc9806 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -309,6 +309,11 @@ struct thread_struct {
struct thread_vr_state ckvr_state; /* Checkpointed VR state */
unsigned long ckvrsave; /* Checkpointed VRSAVE */
#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
+#ifdef CONFIG_PPC_MEM_KEYS
+ unsigned long amr;
+ unsigned long iamr;
+ unsigned long uamor;
+#endif
#ifdef CONFIG_KVM_BOOK3S_32_HANDLER
void* kvm_shadow_vcpu; /* KVM internal data */
#endif /* CONFIG_KVM_BOOK3S_32_HANDLER */