From: Peter Maydell <peter.maydell@linaro.org>
To: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: "Rob Herring" <rob.herring@linaro.org>,
"Peter Crosthwaite" <peter.crosthwaite@xilinx.com>,
"Fabian Aggeler" <aggelerf@ethz.ch>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Alexander Graf" <agraf@suse.de>,
"John Williams" <john.williams@xilinx.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Christoffer Dall" <christoffer.dall@linaro.org>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v4 05/21] target-arm: A32: Use get_mem_index for load/stores
Date: Fri, 23 May 2014 15:45:06 +0100 [thread overview]
Message-ID: <CAFEAcA8KDQfpOG-2YDsvxL65_affBnsyU-jTW49b218p4XBE0g@mail.gmail.com> (raw)
In-Reply-To: <1400805738-11889-6-git-send-email-edgar.iglesias@gmail.com>
On 23 May 2014 01:42, Edgar E. Iglesias <edgar.iglesias@gmail.com> wrote:
> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
>
> Avoid using IS_USER directly as the MMU-idx to simplify future
> changes to the MMU layout.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> @@ -9946,6 +9950,8 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw
> }
> if (insn & (1 << 20)) {
> /* Load. */
> + user = user ? 0 : get_mem_index(s);
> +
> tmp = tcg_temp_new_i32();
> switch (op) {
> case 0:
This conversion from 'user is a flag which is true if in
user mode' to 'user is the memory index we want to use'
is being done only in the 'Load' part of this if, which means
that all the stores in the 'else' clause are going to have
the wrong memory index.
I think we should fix this by replacing this 'user' variable
with a simple 'mmuidx'. Then we can say
mmuidx = get_mem_index(s);
at the point which currently does user = IS_USER();
and
mmuidx = MEM_USER_IDX;
in the bit of decode that currently does user = 1;
This is probably going to be clearest done as a
separate patch before this one.
thanks
-- PMM
next prev parent reply other threads:[~2014-05-23 14:45 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 0:41 [Qemu-devel] [PATCH v4 00/21] target-arm: Preparations for A64 EL2 and 3 Edgar E. Iglesias
2014-05-23 0:41 ` [Qemu-devel] [PATCH v4 01/21] target-arm: Make elr_el1 an array Edgar E. Iglesias
2014-05-23 0:41 ` [Qemu-devel] [PATCH v4 02/21] target-arm: Make esr_el1 " Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 03/21] target-arm: c12_vbar -> vbar_el[] Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 04/21] target-arm: Move get_mem_index to translate.h Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 05/21] target-arm: A32: Use get_mem_index for load/stores Edgar E. Iglesias
2014-05-23 14:26 ` Peter Maydell
2014-05-23 14:45 ` Peter Maydell [this message]
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 06/21] target-arm: Use a 1:1 mapping between EL and MMU index Edgar E. Iglesias
2014-05-23 14:04 ` Peter Maydell
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 07/21] target-arm: A64: Add SP entries for EL2 and 3 Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 08/21] target-arm: A64: Add ELR " Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 09/21] target-arm: Add SPSR entries for EL2/HYP and EL3/MON Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 10/21] target-arm: A64: Introduce aarch64_banked_spsr_index() Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 11/21] target-arm: Add a feature flag for EL2 Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 12/21] target-arm: Add a feature flag for EL3 Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 13/21] target-arm: Register EL2 versions of ELR and SPSR Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 14/21] target-arm: Register EL3 " Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 15/21] target-arm: A64: Forbid ERET to higher or unimplemented ELs Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 16/21] target-arm: A64: Trap ERET from EL0 at translation time Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 17/21] target-arm: A64: Generalize ERET to various ELs Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 18/21] target-arm: A64: Generalize update_spsel for the " Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 19/21] target-arm: Make vbar_write writeback to any CPREG Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 20/21] target-arm: A64: Register VBAR_EL2 Edgar E. Iglesias
2014-05-23 0:42 ` [Qemu-devel] [PATCH v4 21/21] target-arm: A64: Register VBAR_EL3 Edgar E. Iglesias
2014-05-23 12:54 ` [Qemu-devel] [PATCH v4 00/21] target-arm: Preparations for A64 EL2 and 3 Peter Maydell
2014-05-23 15:39 ` Peter Maydell
2014-05-25 0:28 ` Edgar E. Iglesias
2014-05-25 9:09 ` 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=CAFEAcA8KDQfpOG-2YDsvxL65_affBnsyU-jTW49b218p4XBE0g@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=aggelerf@ethz.ch \
--cc=agraf@suse.de \
--cc=alex.bennee@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=edgar.iglesias@gmail.com \
--cc=john.williams@xilinx.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=qemu-devel@nongnu.org \
--cc=rob.herring@linaro.org \
--cc=rth@twiddle.net \
/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).