From 8b1fe3f439eaa2f0a6ee7737942bb6c405725867 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Thu, 12 May 2016 19:52:17 +0300 Subject: cpu-exec: Clean up 'interrupt_request' reloading in cpu_handle_interrupt() Suggested-by: Richard Henderson Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov Message-Id: <1463071937-26607-1-git-send-email-sergey.fedorov@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- cpu-exec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 0ea47e997d..14df1aacf4 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -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 */ -- cgit v1.2.3