]> Gentwo Git Trees - linux/.git/commit
KVM: s390: Enable and disable interrupts in entry code
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 26 Nov 2025 05:33:11 +0000 (16:33 +1100)
committerJanosch Frank <frankja@linux.ibm.com>
Thu, 27 Nov 2025 14:39:46 +0000 (15:39 +0100)
commitd0139059e31acd5fea49737558297d801c406638
tree1edf5b1f078587c46994b54cef858b1a29041e70
parentc067847c52e26eceed9f8a938c04456880c486fa
KVM: s390: Enable and disable interrupts in entry code

Move enabling and disabling of interrupts around the SIE instruction to
entry code. Enabling interrupts only after the __TI_sie flag has been set
guarantees that the SIE instruction is not executed if an interrupt happens
between enabling interrupts and the execution of the SIE instruction.
Interrupt handlers and machine check handler forward the PSW to the
sie_exit label in such cases.

This is a prerequisite for VIRT_XFER_TO_GUEST_WORK to prevent that guest
context is entered when e.g. a scheduler IPI, indicating that a reschedule
is required, happens right before the SIE instruction, which could lead to
long delays.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Tested-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
arch/s390/include/asm/stacktrace.h
arch/s390/kernel/asm-offsets.c
arch/s390/kernel/entry.S
arch/s390/kvm/kvm-s390.c