From patchwork Mon May 25 12:08:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Dovgalyuk X-Patchwork-Id: 476179 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2063D1402B9 for ; Mon, 25 May 2015 22:13:26 +1000 (AEST) Received: from localhost ([::1]:43325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwrFz-0005j6-Ve for incoming@patchwork.ozlabs.org; Mon, 25 May 2015 08:13:24 -0400 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 Received: from [10.10.150.202] (unknown [85.142.117.224]) by mail.ispras.ru (Postfix) with ESMTPSA id E4601540070; Mon, 25 May 2015 15:08:07 +0300 (MSK) To: qemu-devel@nongnu.org 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> User-Agent: StGit/0.16 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 83.149.199.45 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 Subject: [Qemu-devel] [PATCH v14 09/21] i386: interrupt poll processing X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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) {