Skip to content
Snippets Groups Projects
Commit e01cecab authored by Pavel Dovgaluk's avatar Pavel Dovgaluk Committed by Paolo Bonzini
Browse files

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: default avatarPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>

Message-Id: <20171114081812.27640.26372.stgit@pasha-VirtualBox>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 92003610
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment