From patchwork Wed Mar 4 14:35:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 45423 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7317F21416 for ; Wed, 4 Mar 2015 14:39:26 +0000 (UTC) Received: by lbiz11 with SMTP id z11sf14068884lbi.2 for ; Wed, 04 Mar 2015 06:39:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:mime-version:cc:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=8Ard9TAaRIJWXvWN3wPxABGt2MkypZA6K4VYC7KonoA=; b=RmuMk0gLCJ0UqOpQXZ7YwPDZ8gBkFZOmyf+IXP6soU1CJm8k8FXlYx4AL7+F93hs9B t8AS0sxAk8x6utixCWntGDpA8Tboheq/lacijZrDSZ6NlujizXnd8Yst8TILWcg9TI2+ 7w48IWCZWV+Z4FcZffuN+a+LByHGasGFA2+YiiNXklSPDSlUa+8P4HzNsRR+yDlEpj1Q 0Bv/qs6bBPzpCnXrUzza+E5WcIrC4YDWUwbLb/SF1Aj6Q48JqijJ0dQZpFOwpd7TTQX6 AUA05/MFsrC2Q4FDM/z5ljmYc9bqswRihGMed453NIuuMGWd/1DK8bfgk8TGuu15LxQt LdQA== X-Gm-Message-State: ALoCoQnXZUE7dt4Lo4ZeEZksHnwAJVbuSdqJMY42bU1I+5ikSjhAwhjQaPH9Ll+v0rAQCMbRAR+4 X-Received: by 10.152.6.41 with SMTP id x9mr733730lax.10.1425479965362; Wed, 04 Mar 2015 06:39:25 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.136 with SMTP id e8ls207525lam.91.gmail; Wed, 04 Mar 2015 06:39:25 -0800 (PST) X-Received: by 10.152.8.229 with SMTP id u5mr3829749laa.4.1425479965186; Wed, 04 Mar 2015 06:39:25 -0800 (PST) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id i2si2589338lam.153.2015.03.04.06.39.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 06:39:24 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbiw7 with SMTP id w7so5332379lbi.7 for ; Wed, 04 Mar 2015 06:39:24 -0800 (PST) X-Received: by 10.112.172.229 with SMTP id bf5mr3703390lbc.72.1425479964881; Wed, 04 Mar 2015 06:39:24 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1260168lbj; Wed, 4 Mar 2015 06:39:24 -0800 (PST) X-Received: by 10.70.126.133 with SMTP id my5mr7133651pdb.139.1425479963244; Wed, 04 Mar 2015 06:39:23 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id pt7si1988293pdb.96.2015.03.04.06.39.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 06:39:23 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YTAQG-00032P-QX; Wed, 04 Mar 2015 14:37:16 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YTAPv-0002wD-D6 for linux-arm-kernel@bombadil.infradead.org; Wed, 04 Mar 2015 14:36:55 +0000 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155] helo=socrates.bennee.com) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YTAPs-0003z4-Tj for linux-arm-kernel@lists.infradead.org; Wed, 04 Mar 2015 14:36:53 +0000 Received: from localhost ([127.0.0.1] helo=zen.linaroharston) by socrates.bennee.com with esmtp (Exim 4.80) (envelope-from ) id 1YTBOm-0007Xe-BW; Wed, 04 Mar 2015 16:39:48 +0100 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 6/6] target-arm: cpu.h document why env->spsr exists Date: Wed, 4 Mar 2015 14:35:53 +0000 Message-Id: <1425479753-18349-7-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.3.1 In-Reply-To: <1425479753-18349-1-git-send-email-alex.bennee@linaro.org> References: <1425479753-18349-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: alex.bennee@linaro.org X-SA-Exim-Scanned: No (on socrates.bennee.com); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150304_093653_130967_5A39720A X-CRM114-Status: UNSURE ( 9.07 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.0 on merlin.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Peter Maydell , kvm@vger.kernel.org, marc.zyngier@arm.com, linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alex.bennee@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 I was getting very confused about the duplication of state. Perhaps we should just get rid of env->spsr and use helpers that understand the banking? Signed-off-by: Alex Bennée diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 11845a6..d7fd13f 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -155,6 +155,11 @@ typedef struct CPUARMState { This contains all the other bits. Use cpsr_{read,write} to access the whole CPSR. */ uint32_t uncached_cpsr; + /* The spsr is a alias for spsr_elN where N is the current + * exception level. It is provided for here so the TCG msr/mrs + * implementation can access one register. Care needs to be taken + * to ensure the banked_spsr[] is also updated. + */ uint32_t spsr; /* Banked registers. */