diff options
author | Alex Bennée | 2019-12-17 16:08:57 +0100 |
---|---|---|
committer | Alex Bennée | 2020-01-09 12:41:29 +0100 |
commit | 4ff5ef9e911c670ca10cdd36dd27c5395ec2c753 (patch) | |
tree | 5abc54db219c91ed383e48bbfaad767b8628b1e9 /linux-user/aarch64/cpu_loop.c | |
parent | target/arm: remove unused EXCP_SEMIHOST leg (diff) | |
download | qemu-4ff5ef9e911c670ca10cdd36dd27c5395ec2c753.tar.gz qemu-4ff5ef9e911c670ca10cdd36dd27c5395ec2c753.tar.xz qemu-4ff5ef9e911c670ca10cdd36dd27c5395ec2c753.zip |
target/arm: only update pc after semihosting completes
Before we introduce blocking semihosting calls we need to ensure we
can restart the system on semi hosting exception. To be able to do
this the EXCP_SEMIHOST operation should be idempotent until it finally
completes. Practically this means ensureing we only update the pc
after the semihosting call has completed.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'linux-user/aarch64/cpu_loop.c')
-rw-r--r-- | linux-user/aarch64/cpu_loop.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-user/aarch64/cpu_loop.c b/linux-user/aarch64/cpu_loop.c index 31c845a70d..bbe9fefca8 100644 --- a/linux-user/aarch64/cpu_loop.c +++ b/linux-user/aarch64/cpu_loop.c @@ -130,6 +130,7 @@ void cpu_loop(CPUARMState *env) break; case EXCP_SEMIHOST: env->xregs[0] = do_arm_semihosting(env); + env->pc += 4; break; case EXCP_YIELD: /* nothing to do here for user-mode, just resume guest code */ |