From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0tnW-0005qm-7w for qemu-devel@nongnu.org; Thu, 12 May 2016 12:49:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0tnS-0005Sa-1R for qemu-devel@nongnu.org; Thu, 12 May 2016 12:49:14 -0400 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:33561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0tnR-0005SL-Q4 for qemu-devel@nongnu.org; Thu, 12 May 2016 12:49:09 -0400 Received: by mail-lf0-x241.google.com with SMTP id j8so8293445lfd.0 for ; Thu, 12 May 2016 09:49:09 -0700 (PDT) References: <1463062461-717-1-git-send-email-sergey.fedorov@linaro.org> From: Sergey Fedorov Message-ID: <5734B402.4050405@gmail.com> Date: Thu, 12 May 2016 19:49:06 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [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: Richard Henderson , Sergey Fedorov , qemu-devel@nongnu.org Cc: Paolo Bonzini , Peter Crosthwaite 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