linux-stable/arch/s390
Ilya Leoshkevich ba853a4e1c KVM: s390: interrupt: Fix single-stepping kernel-emulated instructions
Single-stepping a kernel-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 kvm_handle_sie_intercept(), after injecting the
interrupt, also processes the PER event and arranges a KVM_SINGLESTEP
exit. The interrupt is not yet delivered, however, so the userspace
sees the next instruction.

Fix by avoiding the KVM_SINGLESTEP exit when there is a pending
interrupt. The next __vcpu_run() loop iteration will arrange a
KVM_SINGLESTEP exit after delivering the interrupt.

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-4-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:19 +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 kernel-emulated instructions 2023-08-28 09:24:19 +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
Makefile s390/decompressor: fix misaligned symbol build error 2023-06-28 13:57:09 +02:00