s390/mcck: fix invalid KVM guest condition check
authorAlexander Gordeev <agordeev@linux.ibm.com>
Mon, 17 May 2021 06:18:12 +0000 (08:18 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 7 Jun 2021 10:12:03 +0000 (12:12 +0200)
Wrong condition check is used to decide if a machine check hit
while in KVM guest. As result of this check the instruction
following the SIE critical section might be considered as still
in KVM guest and _CIF_MCCK_GUEST CPU flag mistakenly set as
result.

Fixes: c929500d7a5a ("s390/nmi: s390: New low level handling for machine check happening in guest")
Cc: <stable@vger.kernel.org>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/entry.S

index 3a81e38c95e74544f8b4e9b42e9dea2e56cc313a..9cc71ca9a88f975aac3be650901e8cef325d7b0d 100644 (file)
@@ -653,7 +653,7 @@ ENDPROC(stack_overflow)
        slgr    %r9,%r13
        lghi    %r13,.Lsie_skip - .Lsie_entry
        clgr    %r9,%r13
-       jh      .Lcleanup_sie_int
+       jhe     .Lcleanup_sie_int
        oi      __LC_CPU_FLAGS+7, _CIF_MCCK_GUEST
 .Lcleanup_sie_int:
        BPENTER __SF_SIE_FLAGS(%r15),(_TIF_ISOLATE_BP|_TIF_ISOLATE_BP_GUEST)