s390/mcck: isolate SIE instruction when setting CIF_MCCK_GUEST flag
Commitd768bd892f
("s390: add options to change branch prediction behaviour for the kernel") introduced .Lsie_exit label - supposedly to fence off SIE instruction. However, the corresponding address range length .Lsie_crit_mcck_length was not updated, which led to BPON code potentionally marked with CIF_MCCK_GUEST flag. Both .Lsie_exit and .Lsie_crit_mcck_length were removed with commit0b0ed657fe
("s390: remove critical section cleanup from entry.S"), but the issue persisted - currently BPOFF and BPENTER macros might get wrongly considered by the machine check handler as a guest. Fixes:d768bd892f
("s390: add options to change branch prediction behaviour for the kernel") Reviewed-by: Sven Schnelle <svens@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
3ae11dbcfa
commit
29ccaa4b35
|
@ -251,6 +251,10 @@ ENTRY(sie64a)
|
||||||
BPEXIT __SF_SIE_FLAGS(%r15),(_TIF_ISOLATE_BP|_TIF_ISOLATE_BP_GUEST)
|
BPEXIT __SF_SIE_FLAGS(%r15),(_TIF_ISOLATE_BP|_TIF_ISOLATE_BP_GUEST)
|
||||||
.Lsie_entry:
|
.Lsie_entry:
|
||||||
sie 0(%r14)
|
sie 0(%r14)
|
||||||
|
# Let the next instruction be NOP to avoid triggering a machine check
|
||||||
|
# and handling it in a guest as result of the instruction execution.
|
||||||
|
nopr 7
|
||||||
|
.Lsie_leave:
|
||||||
BPOFF
|
BPOFF
|
||||||
BPENTER __SF_SIE_FLAGS(%r15),(_TIF_ISOLATE_BP|_TIF_ISOLATE_BP_GUEST)
|
BPENTER __SF_SIE_FLAGS(%r15),(_TIF_ISOLATE_BP|_TIF_ISOLATE_BP_GUEST)
|
||||||
.Lsie_skip:
|
.Lsie_skip:
|
||||||
|
@ -547,7 +551,7 @@ ENTRY(mcck_int_handler)
|
||||||
jno .Lmcck_panic
|
jno .Lmcck_panic
|
||||||
#if IS_ENABLED(CONFIG_KVM)
|
#if IS_ENABLED(CONFIG_KVM)
|
||||||
OUTSIDE %r9,.Lsie_gmap,.Lsie_done,6f
|
OUTSIDE %r9,.Lsie_gmap,.Lsie_done,6f
|
||||||
OUTSIDE %r9,.Lsie_entry,.Lsie_skip,4f
|
OUTSIDE %r9,.Lsie_entry,.Lsie_leave,4f
|
||||||
oi __LC_CPU_FLAGS+7, _CIF_MCCK_GUEST
|
oi __LC_CPU_FLAGS+7, _CIF_MCCK_GUEST
|
||||||
j 5f
|
j 5f
|
||||||
4: CHKSTG .Lmcck_panic
|
4: CHKSTG .Lmcck_panic
|
||||||
|
|
Loading…
Reference in New Issue