diff options
author | Pavel Dovgalyuk | 2017-11-14 09:18:12 +0100 |
---|---|---|
committer | Paolo Bonzini | 2017-11-14 14:46:46 +0100 |
commit | e01cecabf3e04d22340d7e8b3616ef051c42c891 (patch) | |
tree | 5e0c99abe12300563d2b599f252dbc1127a62c2f /accel | |
parent | vhost-user-scsi: add missing virtqueue_size param (diff) | |
download | qemu-e01cecabf3e04d22340d7e8b3616ef051c42c891.tar.gz qemu-e01cecabf3e04d22340d7e8b3616ef051c42c891.tar.xz qemu-e01cecabf3e04d22340d7e8b3616ef051c42c891.zip |
cpu-exec: don't overwrite exception_index
This patch adds a condition before overwriting exception_index fiels.
It is needed when exception_index is already set to some meaningful value.
Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Message-Id: <20171114081812.27640.26372.stgit@pasha-VirtualBox>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'accel')
-rw-r--r-- | accel/tcg/cpu-exec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 61297f8f4a..0473055a08 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -594,7 +594,9 @@ static inline bool cpu_handle_interrupt(CPUState *cpu, if (unlikely(atomic_read(&cpu->exit_request) || (use_icount && cpu->icount_decr.u16.low + cpu->icount_extra == 0))) { atomic_set(&cpu->exit_request, 0); - cpu->exception_index = EXCP_INTERRUPT; + if (cpu->exception_index == -1) { + cpu->exception_index = EXCP_INTERRUPT; + } return true; } |