diff options
author | Peter Maydell | 2018-04-11 15:23:56 +0200 |
---|---|---|
committer | Peter Maydell | 2018-04-11 15:23:56 +0200 |
commit | 6523eaca378df1455481f1cec65ada589d65df0e (patch) | |
tree | bcab49b7b0fe2a58cc38729c94477e03b2dde022 /accel/tcg/cpu-exec-common.c | |
parent | Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-r... (diff) | |
parent | icount: fix cpu_restore_state_from_tb for non-tb-exit cases (diff) | |
download | qemu-6523eaca378df1455481f1cec65ada589d65df0e.tar.gz qemu-6523eaca378df1455481f1cec65ada589d65df0e.tar.xz qemu-6523eaca378df1455481f1cec65ada589d65df0e.zip |
Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180411' into staging
Handle read-modify-write i/o with icount
# gpg: Signature made Wed 11 Apr 2018 00:07:23 BST
# gpg: using RSA key 64DF38E8AF7E215F
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>"
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F
* remotes/rth/tags/pull-tcg-20180411:
icount: fix cpu_restore_state_from_tb for non-tb-exit cases
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'accel/tcg/cpu-exec-common.c')
-rw-r--r-- | accel/tcg/cpu-exec-common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c index dac5aac477..2988fde650 100644 --- a/accel/tcg/cpu-exec-common.c +++ b/accel/tcg/cpu-exec-common.c @@ -27,10 +27,8 @@ bool tcg_allowed; /* exit the current TB, but without causing any exception to be raised */ void cpu_loop_exit_noexc(CPUState *cpu) { - /* XXX: restore cpu registers saved in host registers */ - cpu->exception_index = -1; - siglongjmp(cpu->jmp_env, 1); + cpu_loop_exit(cpu); } #if defined(CONFIG_SOFTMMU) @@ -65,15 +63,17 @@ void cpu_reloading_memory_map(void) void cpu_loop_exit(CPUState *cpu) { + /* Undo the setting in cpu_tb_exec. */ + cpu->can_do_io = 1; siglongjmp(cpu->jmp_env, 1); } void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc) { if (pc) { - cpu_restore_state(cpu, pc); + cpu_restore_state(cpu, pc, true); } - siglongjmp(cpu->jmp_env, 1); + cpu_loop_exit(cpu); } void cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc) |