diff options
author | Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> | 2017-11-14 11:18:18 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-11-14 14:46:46 +0100 |
commit | 17b50b0c299f1266578b01f7134810362418ac2e (patch) | |
tree | e758e9c1eb9aa5e65f3a4636589a96d09f6eaf6f /util/stats64.c | |
parent | e01cecabf3e04d22340d7e8b3616ef051c42c891 (diff) |
cpu-exec: avoid cpu_exec_nocache infinite loop with record/replay
This patch ensures that icount_decr.u32.high is clear before calling
cpu_exec_nocache when exception is pending. Because the exception is
caused by the first instruction in the block and it cannot be executed
without resetting the flag.
There are two parts in the fix. First, clear icount_decr.u32.high in
cpu_handle_interrupt (just before processing the "dependent" request,
stored in cpu->interrupt_request or cpu->exit_request) rather than
cpu_loop_exec_tb; this ensures that cpu_handle_exception is always
reached with zero icount_decr.u32.high unless another interrupt has
happened in the meanwhile.
Second, try to cause the exception at the beginning of
cpu_handle_exception, and exit immediately if the TB cannot
execute. With this change, interrupts are processed and
cpu_exec_nocache can make process.
Signed-off-by: Maria Klimushenkova <maria.klimushenkova@ispras.ru>
Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Message-Id: <20171114081818.27640.33165.stgit@pasha-VirtualBox>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util/stats64.c')
0 files changed, 0 insertions, 0 deletions