From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-arm@nongnu.org
Cc: qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH 2/2] target/arm: Fix ATS1Hx instructions
Date: Mon, 05 Nov 2018 16:48:39 +0000 [thread overview]
Message-ID: <87sh0feahk.fsf@linaro.org> (raw)
In-Reply-To: <20181016093703.10637-3-peter.maydell@linaro.org>
Peter Maydell <peter.maydell@linaro.org> writes:
> ATS1HR and ATS1HW (which allow AArch32 EL2 to do address translations
> on the EL2 translation regime) were implemented in commit 14db7fe09a2c8.
> However, we got them wrong: these should do stage 1 address translations
> as defined for NS-EL2, which is ARMMMUIdx_S1E2. We were incorrectly
> making them perform stage 2 translations.
>
> A few years later in commit 1313e2d7e2cd we forgot entirely that
> we'd implemented ATS1Hx, and added a comment that ATS1Hx were
> "not supported yet". Remove the comment; there is no extra code
> needed to handle these operations in do_ats_write(), because
> arm_s1_regime_using_lpae_format() returns true for ARMMMUIdx_S1E2,
> which forces 64-bit PAR format.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> target/arm/helper.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index dc849b09893..903a832f1fa 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -2316,7 +2316,7 @@ static uint64_t do_ats_write(CPUARMState *env, uint64_t value,
> *
> * (Note that HCR.DC makes HCR.VM behave as if it is 1.)
> *
> - * ATS1Hx always uses the 64bit format (not supported yet).
> + * ATS1Hx always uses the 64bit format.
> */
> format64 = arm_s1_regime_using_lpae_format(env, mmu_idx);
>
> @@ -2441,7 +2441,7 @@ static void ats1h_write(CPUARMState *env, const ARMCPRegInfo *ri,
> MMUAccessType access_type = ri->opc2 & 1 ? MMU_DATA_STORE : MMU_DATA_LOAD;
> uint64_t par64;
>
> - par64 = do_ats_write(env, value, access_type, ARMMMUIdx_S2NS);
> + par64 = do_ats_write(env, value, access_type, ARMMMUIdx_S1E2);
>
> A32_BANKED_CURRENT_REG_SET(env, par, par64);
> }
--
Alex Bennée
next prev parent reply other threads:[~2018-11-05 16:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-16 9:37 [Qemu-devel] [PATCH 0/2] target/arm: fix some ATS* bugs Peter Maydell
2018-10-16 9:37 ` [Qemu-devel] [PATCH 1/2] target/arm: Set S and PTW in 64-bit PAR format Peter Maydell
2018-11-05 15:23 ` [Qemu-devel] [Qemu-arm] " Edgar E. Iglesias
2018-11-05 16:24 ` Alex Bennée
2018-11-05 16:25 ` Peter Maydell
2018-11-05 16:50 ` Alex Bennée
2018-10-16 9:37 ` [Qemu-devel] [PATCH 2/2] target/arm: Fix ATS1Hx instructions Peter Maydell
2018-11-05 16:48 ` Alex Bennée [this message]
2018-11-05 19:30 ` [Qemu-devel] [Qemu-arm] " Edgar E. Iglesias
2018-11-02 17:55 ` [Qemu-devel] [Qemu-arm] [PATCH 0/2] target/arm: fix some ATS* bugs Peter Maydell
2018-11-06 9:50 ` [Qemu-devel] " no-reply
2018-11-06 10:00 ` Fam Zheng
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=87sh0feahk.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=patches@linaro.org \
--cc=qemu-arm@nongnu.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).