qemu-e2k/accel
Pavel Dovgalyuk 17b50b0c29 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>
2017-11-14 14:46:46 +01:00
..
kvm kvm: simplify kvm_align_section() 2017-10-18 10:15:00 +02:00
stubs kvm: check KVM_CAP_SYNC_MMU with kvm_vm_check_extension() 2017-10-02 14:38:06 +02:00
tcg cpu-exec: avoid cpu_exec_nocache infinite loop with record/replay 2017-11-14 14:46:46 +01:00
Makefile.objs tcg: add the CONFIG_TCG into Makefiles 2017-07-05 09:12:44 +02:00
accel.c accel: cleanup error output 2017-08-01 17:27:33 +02:00