From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
kvm@vger.kernel.org, marc.zyngier@arm.com,
linux-arm-kernel@lists.infradead.org,
"Alex Bennée" <alex.bennee@linaro.org>,
kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org
Subject: [Qemu-devel] [PATCH v2 6/6] target-arm: cpu.h document why env->spsr exists
Date: Wed, 4 Mar 2015 14:35:53 +0000 [thread overview]
Message-ID: <1425479753-18349-7-git-send-email-alex.bennee@linaro.org> (raw)
In-Reply-To: <1425479753-18349-1-git-send-email-alex.bennee@linaro.org>
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 <alex.bennee@linaro.org>
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. */
--
2.3.1
next prev parent reply other threads:[~2015-03-04 14:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 14:35 [Qemu-devel] [PATCH v2 0/6] QEMU ARM64 Migration Fixes Alex Bennée
2015-03-04 14:35 ` [Qemu-devel] [PATCH v2 1/6] target-arm: kvm: save/restore mp state Alex Bennée
2015-03-11 13:42 ` Greg Bellows
2015-03-12 15:43 ` Peter Maydell
2015-03-13 10:40 ` Alex Bennée
2015-03-04 14:35 ` [Qemu-devel] [PATCH v2 2/6] hw/intc: arm_gic_kvm.c restore config first Alex Bennée
2015-03-11 13:59 ` Greg Bellows
2015-03-04 14:35 ` [Qemu-devel] [PATCH v2 3/6] hw/char: pl011 don't keep setting the IRQ if nothing changed Alex Bennée
2015-03-11 14:44 ` Greg Bellows
2015-03-12 15:51 ` Peter Maydell
2015-03-12 20:27 ` Peter Maydell
2015-03-13 10:38 ` Alex Bennée
2015-03-04 14:35 ` [Qemu-devel] [PATCH v2 4/6] target-arm: kvm64 sync FP register state Alex Bennée
2015-03-11 15:17 ` Greg Bellows
2015-03-04 14:35 ` [Qemu-devel] [PATCH v2 5/6] target-arm: kvm64 fix save/restore of SPSR regs Alex Bennée
2015-03-09 13:26 ` Christoffer Dall
2015-03-11 19:41 ` Greg Bellows
2015-03-04 14:35 ` Alex Bennée [this message]
2015-03-04 14:46 ` [Qemu-devel] [PATCH v2 6/6] target-arm: cpu.h document why env->spsr exists Peter Maydell
2015-03-04 16:27 ` Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1425479753-18349-7-git-send-email-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=marc.zyngier@arm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).