s390/mm/fault: Handle guest-related program interrupts in KVM
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Tue, 22 Oct 2024 12:05:55 +0000 (14:05 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 29 Oct 2024 10:49:18 +0000 (11:49 +0100)
commit05066cafa925159c790904f39ddb17cfa0e96f35
tree18b8c2a310052ee14cb3f7ec68ff1962ee3bbd51
parent473aaf52b937e2401c7ad161a6197bf88e920a9a
s390/mm/fault: Handle guest-related program interrupts in KVM

Any program interrupt that happens in the host during the execution of
a KVM guest will now short circuit the fault handler and return to KVM
immediately. Guest fault handling (including pfault) will happen
entirely inside KVM.

When sie64a() returns zero, current->thread.gmap_int_code will contain
the program interrupt number that caused the exit, or zero if the exit
was not caused by a host program interrupt.

KVM will now take care of handling all guest faults in vcpu_post_run().

Since gmap faults will not be visible by the rest of the kernel, remove
GMAP_FAULT, the linux fault handlers for secure execution faults, the
exception table entries for the sie instruction, the nop padding after
the sie instruction, and all other references to guest faults from the
s390 code.

Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Co-developed-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/20241022120601.167009-6-imbrenda@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/kvm_host.h
arch/s390/include/asm/processor.h
arch/s390/kernel/entry.S
arch/s390/kernel/traps.c
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/kvm-s390.h
arch/s390/kvm/vsie.c
arch/s390/mm/fault.c