From patchwork Thu May 12 14:14:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sergey.fedorov@linaro.org X-Patchwork-Id: 9081801 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4B6CFBF29F for ; Thu, 12 May 2016 14:15:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A06F1201F4 for ; Thu, 12 May 2016 14:15:10 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E8376201EC for ; Thu, 12 May 2016 14:15:09 +0000 (UTC) Received: from localhost ([::1]:57709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0rON-000483-2G for patchwork-qemu-devel@patchwork.kernel.org; Thu, 12 May 2016 10:15:07 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=90t97cJ/wQnjdwXEqZ1W9OlkwDSTQRRHbpiblOsWlto=; b=RYGSOmP+S0fNkXjkVxodJAlenqtxudbUQ2Ga7pZY1XEWiKhXZrqai9UNQzuG2BlAEo 5u2jNkLLphaA/Ss3iBF8WXUtN7rxXdrxWLdgPbY3UZlHV+jw3qACkf9CVF99IozPg5VQ dG9iSIydFpp/CwQSNjvNtcCBnomGCa0uz0GQI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=90t97cJ/wQnjdwXEqZ1W9OlkwDSTQRRHbpiblOsWlto=; b=mgwNrhOM5XhR4uZrIDHJWFFK0HburrJKcfUCCVEEdt/n/upCybMEsyH7mZuYR2IUAl mXhQzXLlS3SnNiKPRniZ1kZxoVgIfy5GaNssUhTZN8ROhacBhHeF7s3SCQxfAHFib3Yx 5GeRN2KS97I46FaMOx7IsfEKLkQxYcToOweZGD6gSj62HBubOA7cj9NCC/b9zSCfVyrN FDReXu3uhB/u8ymMmyIZv+xG6/spOWunH8spbSgFsuApMUfyt/GLpdf4n0vjb7AsaoNl hTltT2SeqKt+Ivnq1gl4EzRzrhpbZ94Mf5wN+ywatLSKshG4f9KEMg4h5umMFgUxn5oh 6pMA== X-Gm-Message-State: AOPr4FUY7xVjMex/ZBj3EXCACgMrimcwNYc0nNhBJeB2LNcfGIzYhe/D/8iDvWbnIepsib4v X-Received: by 10.25.19.66 with SMTP id j63mr4561805lfi.24.1463062469558; Thu, 12 May 2016 07:14:29 -0700 (PDT) Received: from sergey-laptop.Dlink (broadband-46-188-121-115.2com.net. [46.188.121.115]) by smtp.gmail.com with ESMTPSA id p199sm2148276lfd.12.2016.05.12.07.14.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 May 2016 07:14:28 -0700 (PDT) From: Sergey Fedorov To: qemu-devel@nongnu.org Date: Thu, 12 May 2016 17:14:21 +0300 Message-Id: <1463062461-717-1-git-send-email-sergey.fedorov@linaro.org> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22d Subject: [Qemu-devel] [PATCH] cpu-exec: Clean up 'interrupt_request' reloading in cpu_handle_interrupt() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sergey Fedorov , Richard Henderson , Peter Crosthwaite , Sergey Fedorov , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 */