linux-stable/arch/s390
Ilya Leoshkevich 1ad1fa820e KVM: s390: interrupt: Fix single-stepping userspace-emulated instructions
Single-stepping a userspace-emulated instruction that generates an
interrupt causes GDB to land on the instruction following it instead of
the respective interrupt handler.

The reason is that after arranging a KVM_EXIT_S390_SIEIC exit,
kvm_handle_sie_intercept() calls kvm_s390_handle_per_ifetch_icpt(),
which sets KVM_GUESTDBG_EXIT_PENDING. This bit, however, is not
processed immediately, but rather persists until the next ioctl(),
causing a spurious single-step exit.

Fix by clearing this bit in ioctl().

Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-ID: <20230725143857.228626-5-iii@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
2023-08-28 09:24:20 +00:00
..
appldata s390: include linux/io.h instead of asm/io.h 2023-07-03 11:19:40 +02:00
boot s390 updates for 6.5 merge window part 2 2023-07-06 13:18:30 -07:00
configs s390/defconfigs: set CONFIG_NET_TC_SKB_EXT=y 2023-06-22 15:02:01 +02:00
crypto s390: fix various typos 2023-07-03 11:19:42 +02:00
hypfs s390/hypfs: remove unused info_blk_hdr__pcpus() function 2022-11-23 16:24:07 +01:00
include s390 updates for 6.5 merge window part 2 2023-07-06 13:18:30 -07:00
kernel s390 updates for 6.5 merge window part 2 2023-07-06 13:18:30 -07:00
kvm KVM: s390: interrupt: Fix single-stepping userspace-emulated instructions 2023-08-28 09:24:20 +00:00
lib s390: include linux/io.h instead of asm/io.h 2023-07-03 11:19:40 +02:00
mm s390 updates for 6.5 merge window part 2 2023-07-06 13:18:30 -07:00
net s390: consistently use .balign instead of .align 2023-06-28 13:57:09 +02:00
pci s390: fix various typos 2023-07-03 11:19:42 +02:00
purgatory s390 updates for 6.5 merge window part 2 2023-07-06 13:18:30 -07:00
tools KVM: s390: Add facility 197 to the allow list 2022-07-13 15:25:25 +02:00
Kbuild
Kconfig s390 updates for 6.5 merge window 2023-06-27 15:49:10 -07:00
Kconfig.debug s390/Kconfig.debug: fix indentation 2022-06-01 12:03:15 +02:00
Makefile s390/decompressor: fix misaligned symbol build error 2023-06-28 13:57:09 +02:00