From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9UPF-0005EF-1b for qemu-devel@nongnu.org; Tue, 31 Oct 2017 07:08:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9UPA-0007T2-2A for qemu-devel@nongnu.org; Tue, 31 Oct 2017 07:08:28 -0400 Received: from mail.ispras.ru ([83.149.199.45]:42404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9UP9-0007SX-Qc for qemu-devel@nongnu.org; Tue, 31 Oct 2017 07:08:23 -0400 From: Pavel Dovgalyuk Date: Tue, 31 Oct 2017 14:08:24 +0300 Message-ID: <20171031110824.5836.51548.stgit@pasha-VirtualBox> In-Reply-To: <20171031110641.5836.43266.stgit@pasha-VirtualBox> References: <20171031110641.5836.43266.stgit@pasha-VirtualBox> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [RFC PATCH 19/26] cpu-exec: reset exit flag before calling cpu_exec_nocache List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: dovgaluk@ispras.ru This patch resets icount_decr.u32.high before calling cpu_exec_nocache when exception is pending. Exception is caused by the first instruction in the block and it cannot be executed without resetting the flag. Signed-off-by: Maria Klimushenkova Signed-off-by: Pavel Dovgalyuk --- accel/tcg/cpu-exec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 35d0240..aaa9c2d 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -500,6 +500,7 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret) } else if (replay_has_exception() && cpu->icount_decr.u16.low + cpu->icount_extra == 0) { /* try to cause an exception pending in the log */ + atomic_set(&cpu->icount_decr.u16.high, 0); cpu_exec_nocache(cpu, 1, tb_find(cpu, NULL, 0, curr_cflags()), true); *ret = -1; return true;