diff mbox series

[PULL,2/8] target/xtensa: linux-user: rewind pc for restarted syscall

Message ID 20180402171354.27706-3-jcmvbkbc@gmail.com
State New
Headers show
Series [PULL,1/8] target/xtensa: fix flush_window_regs | expand

Commit Message

Max Filippov April 2, 2018, 5:13 p.m. UTC
In case of syscall restart request set pc back to the syscall
instruction.

Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 linux-user/main.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/linux-user/main.c b/linux-user/main.c
index ba09b7d0c873..8907a8411411 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -4006,6 +4006,9 @@  void cpu_loop(CPUXtensaState *env)
                     break;
 
                 case -TARGET_ERESTARTSYS:
+                    env->pc -= 3;
+                    break;
+
                 case -TARGET_QEMU_ESIGRETURN:
                     break;
                 }