Home
last modified time | relevance | path

Searched hist:ba853a4e1c7addc631df55535bf0b04c62dc79d8 (Results 1 – 1 of 1) sorted by relevance

/linux/arch/s390/kvm/
H A Dintercept.cdiff ba853a4e1c7addc631df55535bf0b04c62dc79d8 Tue Jul 25 16:37:18 CEST 2023 Ilya Leoshkevich <iii@linux.ibm.com> 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>