From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0rNq-0003h2-9O for qemu-devel@nongnu.org; Thu, 12 May 2016 10:14:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0rNm-0006oe-TE for qemu-devel@nongnu.org; Thu, 12 May 2016 10:14:34 -0400 Received: from mail-lf0-x22d.google.com ([2a00:1450:4010:c07::22d]:33560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0rNm-0006oJ-Ac for qemu-devel@nongnu.org; Thu, 12 May 2016 10:14:30 -0400 Received: by mail-lf0-x22d.google.com with SMTP id y84so72847981lfc.0 for ; Thu, 12 May 2016 07:14:30 -0700 (PDT) From: Sergey Fedorov Date: Thu, 12 May 2016 17:14:21 +0300 Message-Id: <1463062461-717-1-git-send-email-sergey.fedorov@linaro.org> Subject: [Qemu-devel] [PATCH] cpu-exec: Clean up 'interrupt_request' reloading in cpu_handle_interrupt() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Sergey Fedorov , Sergey Fedorov , Paolo Bonzini , Peter Crosthwaite , Richard Henderson From: Sergey Fedorov Suggested-by: Richard Henderson Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov --- This patch applies on top of commit: 40ae3669fb55 ("cpu-exec: Remove unused 'x86_cpu' and 'env' from cpu_exec()") from: git://github.com/rth7680/qemu.git tcg-next cpu-exec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 */ -- 1.9.1