Message ID | 20210813073615.32837-3-frankja@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | s390x: Cleanup and maintenance | expand |
On Fri, 13 Aug 2021 07:36:09 +0000 Janosch Frank <frankja@linux.ibm.com> wrote: > For UV and format 4 SIE tests we need to handle the following PGM > exceptions: 0x3d Secure Storage Access (non-secure CPU accesses > secure storage) 0x3e Non-Secure Storage Access (secure CPU accesses > non-secure storage) 0x3f Mapping of secure guest is wrong > > Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> > --- > lib/s390x/asm/arch_def.h | 3 +++ > lib/s390x/interrupt.c | 3 +++ > 2 files changed, 6 insertions(+) > > diff --git a/lib/s390x/asm/arch_def.h b/lib/s390x/asm/arch_def.h > index 15cf7d48..4ca02c1d 100644 > --- a/lib/s390x/asm/arch_def.h > +++ b/lib/s390x/asm/arch_def.h > @@ -177,6 +177,9 @@ _Static_assert(sizeof(struct lowcore) == 0x1900, > "Lowcore size"); #define PGM_INT_CODE_REGION_FIRST_TRANS > 0x39 #define PGM_INT_CODE_REGION_SECOND_TRANS 0x3a > #define PGM_INT_CODE_REGION_THIRD_TRANS 0x3b > +#define PGM_INT_CODE_SECURE_STOR_ACCESS 0x3d > +#define PGM_INT_CODE_NON_SECURE_STOR_ACCESS 0x3e > +#define PGM_INT_CODE_SECURE_STOR_VIOLATION 0x3f > #define PGM_INT_CODE_MONITOR_EVENT 0x40 > #define PGM_INT_CODE_PER 0x80 > #define PGM_INT_CODE_CRYPTO_OPERATION 0x119 > diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c > index 785b7355..01ded49d 100644 > --- a/lib/s390x/interrupt.c > +++ b/lib/s390x/interrupt.c > @@ -115,6 +115,9 @@ static void fixup_pgm_int(struct stack_frame_int > *stack) case PGM_INT_CODE_REGION_THIRD_TRANS: > case PGM_INT_CODE_PER: > case PGM_INT_CODE_CRYPTO_OPERATION: > + case PGM_INT_CODE_SECURE_STOR_ACCESS: > + case PGM_INT_CODE_NON_SECURE_STOR_ACCESS: > + case PGM_INT_CODE_SECURE_STOR_VIOLATION: > /* The interrupt was nullified, the old PSW points > at the > * responsible instruction. Forward the PSW so we > don't loop. */
diff --git a/lib/s390x/asm/arch_def.h b/lib/s390x/asm/arch_def.h index 15cf7d48..4ca02c1d 100644 --- a/lib/s390x/asm/arch_def.h +++ b/lib/s390x/asm/arch_def.h @@ -177,6 +177,9 @@ _Static_assert(sizeof(struct lowcore) == 0x1900, "Lowcore size"); #define PGM_INT_CODE_REGION_FIRST_TRANS 0x39 #define PGM_INT_CODE_REGION_SECOND_TRANS 0x3a #define PGM_INT_CODE_REGION_THIRD_TRANS 0x3b +#define PGM_INT_CODE_SECURE_STOR_ACCESS 0x3d +#define PGM_INT_CODE_NON_SECURE_STOR_ACCESS 0x3e +#define PGM_INT_CODE_SECURE_STOR_VIOLATION 0x3f #define PGM_INT_CODE_MONITOR_EVENT 0x40 #define PGM_INT_CODE_PER 0x80 #define PGM_INT_CODE_CRYPTO_OPERATION 0x119 diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c index 785b7355..01ded49d 100644 --- a/lib/s390x/interrupt.c +++ b/lib/s390x/interrupt.c @@ -115,6 +115,9 @@ static void fixup_pgm_int(struct stack_frame_int *stack) case PGM_INT_CODE_REGION_THIRD_TRANS: case PGM_INT_CODE_PER: case PGM_INT_CODE_CRYPTO_OPERATION: + case PGM_INT_CODE_SECURE_STOR_ACCESS: + case PGM_INT_CODE_NON_SECURE_STOR_ACCESS: + case PGM_INT_CODE_SECURE_STOR_VIOLATION: /* The interrupt was nullified, the old PSW points at the * responsible instruction. Forward the PSW so we don't loop. */
For UV and format 4 SIE tests we need to handle the following PGM exceptions: 0x3d Secure Storage Access (non-secure CPU accesses secure storage) 0x3e Non-Secure Storage Access (secure CPU accesses non-secure storage) 0x3f Mapping of secure guest is wrong Signed-off-by: Janosch Frank <frankja@linux.ibm.com> --- lib/s390x/asm/arch_def.h | 3 +++ lib/s390x/interrupt.c | 3 +++ 2 files changed, 6 insertions(+)