diff options
author | Timothy E Baldwin <T.E.Baldwin99@members.leeds.ac.uk> | 2016-05-12 18:47:33 +0100 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2016-05-27 14:49:49 +0300 |
commit | 6db9d00e2f05db0dfcc1a4d8b811fdd40170c91c (patch) | |
tree | fd51caa12e3b275295deaf75ab657e7e4a6e348f /linux-user/main.c | |
parent | 2eb3ae27ec3b797eba16338c08dfac23465f0d7b (diff) | |
download | qemu-6db9d00e2f05db0dfcc1a4d8b811fdd40170c91c.tar.gz qemu-6db9d00e2f05db0dfcc1a4d8b811fdd40170c91c.tar.bz2 qemu-6db9d00e2f05db0dfcc1a4d8b811fdd40170c91c.zip |
linux-user: Support for restarting system calls for PPC targets
Update the PPC main loop code:
* on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn
(We already handle TARGET_QEMU_ESIGRETURN.)
Signed-off-by: Timothy Edward Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
Message-id: 1441497448-32489-8-git-send-email-T.E.Baldwin99@members.leeds.ac.uk
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: tweak commit message; drop TARGET_USE_ERESTARTSYS define]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/main.c')
-rw-r--r-- | linux-user/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 73e36683f8..dfc098f121 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1987,6 +1987,10 @@ void cpu_loop(CPUPPCState *env) ret = do_syscall(env, env->gpr[0], env->gpr[3], env->gpr[4], env->gpr[5], env->gpr[6], env->gpr[7], env->gpr[8], 0, 0); + if (ret == -TARGET_ERESTARTSYS) { + env->nip -= 4; + break; + } if (ret == (target_ulong)(-TARGET_QEMU_ESIGRETURN)) { /* Returning from a successful sigreturn syscall. Avoid corrupting register state. */ |