replay: check icount in cpu exec loop
commitcfb2d02be9413d45b30ed6d8e38800250b6b4b48
authorPavel Dovgalyuk <dovgaluk@ispras.ru>
Tue, 7 Feb 2017 06:54:57 +0000 (7 09:54 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 Feb 2017 14:51:19 +0000 (24 15:51 +0100)
tree20061573b26c877ddc37e96485102d1717fe33f3
parent1aab16c28a0232d898d6f56f5a56019472296ee7
replay: check icount in cpu exec loop

This patch adds check to break cpu loop when icount expires without
setting the TB_EXIT_ICOUNT_EXPIRED flag. It happens when there is no
available translated blocks and all instructions were executed.
In icount replay mode unnecessary tb_find will be called (which may
cause an exception) and execution will be non-deterministic.
Because cpu_loop_exec_tb cannot longjmp anymore, we can remove
the anticipated call to align_clocks in cpu_loop_exec_tb, as
well as the SyncClocks *sc argument.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Message-Id: <002801d2810f$18809c20$4981d460$@ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Pavel Dovgalyuk <dovgaluk@ispras.ru>
cpu-exec.c