From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwrAy-0004gj-RK for qemu-devel@nongnu.org; Mon, 25 May 2015 08:08:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwrAu-0006LU-Tt for qemu-devel@nongnu.org; Mon, 25 May 2015 08:08:12 -0400 Received: from mail.ispras.ru ([83.149.199.45]:39294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwrAu-0006LP-MS for qemu-devel@nongnu.org; Mon, 25 May 2015 08:08:08 -0400 From: Pavel Dovgalyuk Date: Mon, 25 May 2015 15:08:07 +0300 Message-ID: <20150525120806.1052.34302.stgit@PASHA-ISP> In-Reply-To: <20150525120707.1052.44580.stgit@PASHA-ISP> References: <20150525120707.1052.44580.stgit@PASHA-ISP> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH v14 09/21] i386: interrupt poll processing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, alex.bennee@linaro.org, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, maria.klimushenkova@ispras.ru, pavel.dovgaluk@ispras.ru, pbonzini@redhat.com, fred.konrad@greensocs.com This patch updates x86_cpu_exec_interrupt function. It can process two interrupt request at a time (poll and another one). This makes its execution non-deterministic. Determinism is requred for recorded icount execution. Signed-off-by: Pavel Dovgalyuk --- target-i386/seg_helper.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/target-i386/seg_helper.c b/target-i386/seg_helper.c index 2bc757a..92a49b3 100644 --- a/target-i386/seg_helper.c +++ b/target-i386/seg_helper.c @@ -1294,6 +1294,9 @@ bool x86_cpu_exec_interrupt(CPUState *cs, int interrupt_request) if (interrupt_request & CPU_INTERRUPT_POLL) { cs->interrupt_request &= ~CPU_INTERRUPT_POLL; apic_poll_irq(cpu->apic_state); + /* Don't process multiple interrupt requests in a single call. + This is required to make icount-driven execution deterministic. */ + return true; } #endif if (interrupt_request & CPU_INTERRUPT_SIPI) {