Message ID | 20180814181815.23348-42-peter.maydell@linaro.org |
---|---|
State | Accepted |
Commit | 5f62d3b9e67bfc3deb970e3c7fb7df7e57d46fc3 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp4731021ljj; Tue, 14 Aug 2018 12:02:16 -0700 (PDT) X-Google-Smtp-Source: AA+uWPznbr/fQyGssvYZzYgvB+nJMHLKG6RW12scXBOdaDroefKfxT6X8empaYmgT4XCJR3Amgd4 X-Received: by 2002:ae9:eb04:: with SMTP id b4-v6mr21970879qkg.272.1534273336084; Tue, 14 Aug 2018 12:02:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534273336; cv=none; d=google.com; s=arc-20160816; b=SOA+V3qs9r4IMdzwLAer9axot2l9GtZstzKvvEHmChvt7wfpdX/gbDfcYtpbIePcBj KRjH82hBwGdfW7hW5k4QgsL7WHEBQ/3lb2DS6Sx5CHmFssUQi3HiyapLJ1psdmp2q3GA FRJQCyoh+vMC5b6iSYRZQEytmkfziSDcBywzfFOFkrhO0O5Cku9U7+EeT2VGzd8mwn6n oCTjgMdZXLLnli3DW45XQU4D2APvJF/Q52b7mReViqj+p3Cx76Yx3vN6X3Bmzv/sCsb9 7gpR5tAXn8UfWWR/39aQNDjl48WnA/QJYfTgeJy4aOY75tb8X5Y/SRKPwiJbkxn8SwIS riJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=24MPwL7pdoxVoRSCsfud3gmDJSrc49L7CuKq3KZgFb4=; b=fDonIOng0XpSTGDe/Jbx0zs45X4rJ0lLm+Tc51Qk2SiDpk4SdBa+DexVr/oPBm8wyx o79yfsxtxN0qshKPzqG+kK5MKcf+IGJEMnZRuNbYYh5vE1Dwh4lSfCCtUbefNQs4Xmrr y4DKGmTLyjRbD2lSnJXdrnS81cvFQZ3Ur9hX5WDpy7aEwdODs4ONFWkqdWe8uFAaDV+E aoGLHmG2sU5hn4+8wQwpku/AE63UscXV3DTXV1sUcyNGJk/26+YXA4eQaBrfoLBO7ids IhPWne8WXEVdpzjpPol4b0/vPECQKMn8fYEl3gxNnlDjKk4bfd/fCSHO0IJla+sLXuMc kEIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t2-v6si16027999qvn.81.2018.08.14.12.02.15 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 14 Aug 2018 12:02:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1fpea7-0005JP-HO for patch@linaro.org; Tue, 14 Aug 2018 15:02:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1fpdvq-0005EL-QJ for qemu-devel@nongnu.org; Tue, 14 Aug 2018 14:22:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1fpduL-0006sK-BQ for qemu-devel@nongnu.org; Tue, 14 Aug 2018 14:20:38 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:44432) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1fpduL-0006qy-31 for qemu-devel@nongnu.org; Tue, 14 Aug 2018 14:19:05 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from <pm215@archaic.org.uk>) id 1fpduJ-0007P9-2J for qemu-devel@nongnu.org; Tue, 14 Aug 2018 19:19:03 +0100 From: Peter Maydell <peter.maydell@linaro.org> To: qemu-devel@nongnu.org Date: Tue, 14 Aug 2018 19:18:11 +0100 Message-Id: <20180814181815.23348-42-peter.maydell@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180814181815.23348-1-peter.maydell@linaro.org> References: <20180814181815.23348-1-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 41/45] target/arm: Implement tailchaining for M profile cores X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
target-arm queue
|
expand
|
diff --git a/target/arm/helper.c b/target/arm/helper.c index 559065131a4..8b07bf214ec 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -7162,6 +7162,22 @@ static void do_v7m_exception_exit(ARMCPU *cpu) return; } + /* + * Tailchaining: if there is currently a pending exception that + * is high enough priority to preempt execution at the level we're + * about to return to, then just directly take that exception now, + * avoiding an unstack-and-then-stack. Note that now we have + * deactivated the previous exception by calling armv7m_nvic_complete_irq() + * our current execution priority is already the execution priority we are + * returning to -- none of the state we would unstack or set based on + * the EXCRET value affects it. + */ + if (armv7m_nvic_can_take_pending_exception(env->nvic)) { + qemu_log_mask(CPU_LOG_INT, "...tailchaining to pending exception\n"); + v7m_exception_taken(cpu, excret, true, false); + return; + } + switch_v7m_security_state(env, return_to_secure); {