mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
linux-user: Support for restarting system calls for ARM targets
Update the 32-bit and 64-bit ARM main loop and sigreturn code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * set all guest CPU state within signal.c code on sigreturn * handle TARGET_QEMU_ESIGRETURN in the main loop as the indication that the main loop should not touch any guest CPU state Signed-off-by: Timothy Edward Baldwin <T.E.Baldwin99@members.leeds.ac.uk> Message-id: 1441497448-32489-6-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>
This commit is contained in:
parent
0284b03ba3
commit
f0267ef711
3 changed files with 36 additions and 23 deletions
|
@ -1390,7 +1390,7 @@ long do_rt_sigreturn(CPUARMState *env)
|
|||
}
|
||||
|
||||
unlock_user_struct(frame, frame_addr, 0);
|
||||
return env->xregs[0];
|
||||
return -TARGET_QEMU_ESIGRETURN;
|
||||
|
||||
badframe:
|
||||
unlock_user_struct(frame, frame_addr, 0);
|
||||
|
@ -1902,7 +1902,7 @@ static long do_sigreturn_v1(CPUARMState *env)
|
|||
send_sig(SIGTRAP, current, 1);
|
||||
#endif
|
||||
unlock_user_struct(frame, frame_addr, 0);
|
||||
return env->regs[0];
|
||||
return -TARGET_QEMU_ESIGRETURN;
|
||||
|
||||
badframe:
|
||||
force_sig(TARGET_SIGSEGV /* , current */);
|
||||
|
@ -2028,7 +2028,7 @@ static long do_sigreturn_v2(CPUARMState *env)
|
|||
}
|
||||
|
||||
unlock_user_struct(frame, frame_addr, 0);
|
||||
return env->regs[0];
|
||||
return -TARGET_QEMU_ESIGRETURN;
|
||||
|
||||
badframe:
|
||||
unlock_user_struct(frame, frame_addr, 0);
|
||||
|
@ -2082,7 +2082,7 @@ static long do_rt_sigreturn_v1(CPUARMState *env)
|
|||
send_sig(SIGTRAP, current, 1);
|
||||
#endif
|
||||
unlock_user_struct(frame, frame_addr, 0);
|
||||
return env->regs[0];
|
||||
return -TARGET_QEMU_ESIGRETURN;
|
||||
|
||||
badframe:
|
||||
unlock_user_struct(frame, frame_addr, 0);
|
||||
|
@ -2115,7 +2115,7 @@ static long do_rt_sigreturn_v2(CPUARMState *env)
|
|||
}
|
||||
|
||||
unlock_user_struct(frame, frame_addr, 0);
|
||||
return env->regs[0];
|
||||
return -TARGET_QEMU_ESIGRETURN;
|
||||
|
||||
badframe:
|
||||
unlock_user_struct(frame, frame_addr, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue