Re: [Qemu-devel] [PATCH] icount: fix cpu_restore_state_from_tb for non-tb-exit cases

2018-04-10 Thread Richard Henderson
On 04/10/2018 05:35 PM, Paolo Bonzini wrote: > This is incorrect, "cpu->can_do_io" is 1 when not in tcg_qemu_tb_exec. > In fact, in cpu_exec we have "cpu->can_do_io = 1;" immediately after > siglongjmp, so I propose adding the same "cpu->can_do_io = 1;" > assignment to cpu_exec_step_atomic. Ooo,

Re: [Qemu-devel] [PATCH] icount: fix cpu_restore_state_from_tb for non-tb-exit cases

2018-04-10 Thread Paolo Bonzini
On 09/04/2018 11:13, Pavel Dovgalyuk wrote: > @@ -29,6 +29,7 @@ void cpu_loop_exit_noexc(CPUState *cpu) > { > /* XXX: restore cpu registers saved in host registers */ > > +cpu->can_do_io = !use_icount; > cpu->exception_index = -1; > siglongjmp(cpu->jmp_env, 1); > } > @@

Re: [Qemu-devel] [PATCH] icount: fix cpu_restore_state_from_tb for non-tb-exit cases

2018-04-09 Thread Richard Henderson
On 04/09/2018 07:13 PM, Pavel Dovgalyuk wrote: > In icount mode instructions, that access io memory spaces in the middle > of the translation blocks, invoke TB recompilation. > After recompilation such instructions become last in the TB and are > allowed to access io memory spaces. > When the code

[Qemu-devel] [PATCH] icount: fix cpu_restore_state_from_tb for non-tb-exit cases

2018-04-09 Thread Pavel Dovgalyuk
In icount mode instructions, that access io memory spaces in the middle of the translation blocks, invoke TB recompilation. After recompilation such instructions become last in the TB and are allowed to access io memory spaces. When the code includes instruction like i386 'xchg eax, 0xd080'