Skip to content

Commit

Permalink
cpu-exec: Clean up 'interrupt_request' reloading in cpu_handle_interr…
Browse files Browse the repository at this point in the history
…upt()

Suggested-by: Richard Henderson <[email protected]>
Signed-off-by: Sergey Fedorov <[email protected]>
Signed-off-by: Sergey Fedorov <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
  • Loading branch information
sergefdrv authored and rth7680 committed May 13, 2016
1 parent ba048a4 commit 8b1fe3f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cpu-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,11 @@ static inline void cpu_handle_interrupt(CPUState *cpu,
if (cc->cpu_exec_interrupt(cpu, interrupt_request)) {
*last_tb = NULL;
}
/* The target hook may have updated the 'cpu->interrupt_request';
* reload the 'interrupt_request' value */
interrupt_request = cpu->interrupt_request;
}
/* Don't use the cached interrupt_request value,
do_interrupt may have updated the EXITTB flag. */
if (cpu->interrupt_request & CPU_INTERRUPT_EXITTB) {
if (interrupt_request & CPU_INTERRUPT_EXITTB) {
cpu->interrupt_request &= ~CPU_INTERRUPT_EXITTB;
/* ensure that no TB jump will be modified as
the program flow was changed */
Expand Down

0 comments on commit 8b1fe3f

Please sign in to comment.