From: Peter Maydell <peter.maydell@linaro.org>
To: Greg Bellows <greg.bellows@linaro.org>
Cc: kvm-devel <kvm@vger.kernel.org>,
"Marc Zyngier" <marc.zyngier@arm.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Christoffer Dall" <christoffer.dall@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
arm-mail-list <linux-arm-kernel@lists.infradead.org>
Subject: Re: [Qemu-devel] [PATCH v5 1/6] target-arm: Store SPSR_EL1 state in banked_spsr[1] (SPSR_svc)
Date: Tue, 24 Mar 2015 14:37:40 +0000 [thread overview]
Message-ID: <CAFEAcA9MCtdK_VicF8tgMmmtuoL0pm4TofLcJbcmir6ApjMf0Q@mail.gmail.com> (raw)
In-Reply-To: <CAOgzsHUUsZS5hkyPCWer_OurJXy9v5U3g8AjtRV=9uszL4nntg@mail.gmail.com>
On 24 March 2015 at 14:32, Greg Bellows <greg.bellows@linaro.org> wrote:
> On Mon, Mar 23, 2015 at 12:05 PM, Alex Bennée <alex.bennee@linaro.org> wrote:
>> From: Peter Maydell <peter.maydell@linaro.org>
>> @@ -523,7 +523,7 @@ void aarch64_cpu_do_interrupt(CPUState *cs)
>> aarch64_save_sp(env, arm_current_el(env));
>> env->elr_el[new_el] = env->pc;
>> } else {
>> - env->banked_spsr[0] = cpsr_read(env);
>> + env->banked_spsr[aarch64_banked_spsr_index(new_el)] = cpsr_read(env);
>
> Are the other banks (2-5) only used for KVM? It seems we go out of
> our way to manage this larger SPSR array then not use all of the slots
> in QEMU itself.
They're used in AArch32 (where they are the SPSR for various
32 bit modes). In AArch64 you can access those registers via
MSR/MRS (we probably haven't implemented those yet because they
are only accessible at EL2 and above) so hypervisors can do
worldswitches. But for exception entry and return (which is
what this code is) we only use SPSR_EL0/SPSR_EL1/SPSR_EL2/SPSR_EL3
which is a subset of the AArch32 SPSRs.
-- PMM
next prev parent reply other threads:[~2015-03-24 14:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 17:05 [Qemu-devel] [PATCH v5 0/6] QEMU ARM64 Migration Fixes Alex Bennée
2015-03-23 17:05 ` [Qemu-devel] [PATCH v5 1/6] target-arm: Store SPSR_EL1 state in banked_spsr[1] (SPSR_svc) Alex Bennée
2015-03-24 14:32 ` Greg Bellows
2015-03-24 14:37 ` Peter Maydell [this message]
2015-03-23 17:05 ` [Qemu-devel] [PATCH v5 2/6] target-arm: kvm: save/restore mp state Alex Bennée
2015-03-26 17:11 ` Peter Maydell
2015-03-23 17:05 ` [Qemu-devel] [PATCH v5 3/6] hw/intc: arm_gic_kvm.c restore config first Alex Bennée
2015-03-26 17:12 ` Peter Maydell
2015-03-23 17:05 ` [Qemu-devel] [PATCH v5 4/6] target-arm: kvm64 sync FP register state Alex Bennée
2015-03-26 17:20 ` Peter Maydell
2015-03-23 17:05 ` [Qemu-devel] [PATCH v5 5/6] target-arm: kvm64 fix save/restore of SPSR regs Alex Bennée
2015-03-26 17:25 ` Peter Maydell
2015-03-23 17:05 ` [Qemu-devel] [PATCH v5 6/6] target-arm: cpu.h document why env->spsr exists Alex Bennée
2015-03-26 17:26 ` Peter Maydell
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=CAFEAcA9MCtdK_VicF8tgMmmtuoL0pm4TofLcJbcmir6ApjMf0Q@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=greg.bellows@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=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).