[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/18] linux-user/s390x: Fix single-stepping SVC
From: |
Thomas Huth |
Subject: |
[PULL 05/18] linux-user/s390x: Fix single-stepping SVC |
Date: |
Tue, 6 Jun 2023 07:56:08 +0200 |
From: Ilya Leoshkevich <iii@linux.ibm.com>
Currently single-stepping SVC executes two instructions. The reason is
that EXCP_DEBUG for the SVC instruction itself is masked by EXCP_SVC.
Fix by re-raising EXCP_DEBUG.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230510230213.330134-2-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
linux-user/s390x/cpu_loop.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/linux-user/s390x/cpu_loop.c b/linux-user/s390x/cpu_loop.c
index 285bc60071..8b7ac2879e 100644
--- a/linux-user/s390x/cpu_loop.c
+++ b/linux-user/s390x/cpu_loop.c
@@ -86,6 +86,15 @@ void cpu_loop(CPUS390XState *env)
} else if (ret != -QEMU_ESIGRETURN) {
env->regs[2] = ret;
}
+
+ if (unlikely(cs->singlestep_enabled)) {
+ /*
+ * cpu_tb_exec() did not raise EXCP_DEBUG, because it has seen
+ * that EXCP_SVC was already pending.
+ */
+ cs->exception_index = EXCP_DEBUG;
+ }
+
break;
case EXCP_DEBUG:
--
2.31.1
- [PULL 00/18] s390x and misc patches, Thomas Huth, 2023/06/06
- [PULL 01/18] target/s390x: Fix LCBB overwriting the top 32 bits, Thomas Huth, 2023/06/06
- [PULL 02/18] tests/tcg/s390x: Test LCBB, Thomas Huth, 2023/06/06
- [PULL 03/18] target/s390x: Fix LOCFHR taking the wrong half of R2, Thomas Huth, 2023/06/06
- [PULL 04/18] tests/tcg/s390x: Test LOCFHR, Thomas Huth, 2023/06/06
- [PULL 05/18] linux-user/s390x: Fix single-stepping SVC,
Thomas Huth <=
- [PULL 07/18] Add conditional dependency for libkeyutils, Thomas Huth, 2023/06/06
- [PULL 06/18] tests/tcg/s390x: Test single-stepping SVC, Thomas Huth, 2023/06/06
- [PULL 08/18] target/s390x: Fix MXDB and MXDBR, Thomas Huth, 2023/06/06
- [PULL 10/18] tests/qtest: Run ipmi-bt-test only if CONFIG_IPMI_EXTERN is set, Thomas Huth, 2023/06/06
- [PULL 11/18] gitlab-ci: Remove unused Python package, Thomas Huth, 2023/06/06
- [PULL 09/18] tests/tcg/s390x: Test MXDB and MXDBR, Thomas Huth, 2023/06/06
- [PULL 13/18] scripts: Add qom-cast-macro-clean-cocci-gen.py, Thomas Huth, 2023/06/06
- [PULL 12/18] hw/mips/malta: Fix the malta machine on big endian hosts, Thomas Huth, 2023/06/06
- [PULL 14/18] bulk: Remove pointless QOM casts, Thomas Huth, 2023/06/06
- [PULL 15/18] s390x/tcg: Fix CPU address returned by STIDP, Thomas Huth, 2023/06/06