Commit 1ad1fa8
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>1 parent ba853a4 commit 1ad1fa8
1 file changed
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5383 | 5383 | | |
5384 | 5384 | | |
5385 | 5385 | | |
| 5386 | + | |
5386 | 5387 | | |
5387 | 5388 | | |
5388 | 5389 | | |
5389 | 5390 | | |
5390 | 5391 | | |
5391 | 5392 | | |
5392 | 5393 | | |
5393 | | - | |
| 5394 | + | |
| 5395 | + | |
5394 | 5396 | | |
5395 | 5397 | | |
5396 | 5398 | | |
| |||
5400 | 5402 | | |
5401 | 5403 | | |
5402 | 5404 | | |
5403 | | - | |
| 5405 | + | |
| 5406 | + | |
5404 | 5407 | | |
| 5408 | + | |
| 5409 | + | |
| 5410 | + | |
5405 | 5411 | | |
5406 | | - | |
| 5412 | + | |
| 5413 | + | |
| 5414 | + | |
| 5415 | + | |
| 5416 | + | |
| 5417 | + | |
| 5418 | + | |
| 5419 | + | |
| 5420 | + | |
| 5421 | + | |
| 5422 | + | |
| 5423 | + | |
5407 | 5424 | | |
5408 | 5425 | | |
5409 | 5426 | | |
| |||
0 commit comments