Message ID | 1463062461-717-1-git-send-email-sergey.fedorov@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 05/12/2016 04:14 AM, Sergey Fedorov wrote: > @@ -489,9 +489,10 @@ static inline void cpu_handle_interrupt(CPUState *cpu, > *last_tb = NULL; > } [A] > } > - /* Don't use the cached interrupt_request value, > - do_interrupt may have updated the EXITTB flag. */ > - if (cpu->interrupt_request & CPU_INTERRUPT_EXITTB) { > + /* The target hook may have updated the 'cpu->interrupt_request'; > + * reload the 'interrupt_request' value */ > + interrupt_request = cpu->interrupt_request; > + if (interrupt_request & CPU_INTERRUPT_EXITTB) { Actually I suggested reloading it after the only place it could have changed, at A. r~
On 12/05/16 19:47, Richard Henderson wrote: > On 05/12/2016 04:14 AM, Sergey Fedorov wrote: >> @@ -489,9 +489,10 @@ static inline void cpu_handle_interrupt(CPUState >> *cpu, >> *last_tb = NULL; >> } > > [A] > >> } >> - /* Don't use the cached interrupt_request value, >> - do_interrupt may have updated the EXITTB flag. */ >> - if (cpu->interrupt_request & CPU_INTERRUPT_EXITTB) { >> + /* The target hook may have updated the >> 'cpu->interrupt_request'; >> + * reload the 'interrupt_request' value */ >> + interrupt_request = cpu->interrupt_request; >> + if (interrupt_request & CPU_INTERRUPT_EXITTB) { > > Actually I suggested reloading it after the only place it could have > changed, at A. Oops :) Will fix it and resend. Thanks, Sergey
diff --git a/cpu-exec.c b/cpu-exec.c index 0ea47e997dfa..a7b03f77cf53 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -489,9 +489,10 @@ static inline void cpu_handle_interrupt(CPUState *cpu, *last_tb = NULL; } } - /* Don't use the cached interrupt_request value, - do_interrupt may have updated the EXITTB flag. */ - if (cpu->interrupt_request & CPU_INTERRUPT_EXITTB) { + /* The target hook may have updated the 'cpu->interrupt_request'; + * reload the 'interrupt_request' value */ + interrupt_request = cpu->interrupt_request; + 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 */