From: "Rémi Denis-Courmont" <remi@remlab.net>
To: qemu-arm@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Idan Horowitz <idan.horowitz@gmail.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH 1/3] target/arm: Check VSTCR.SW when assigning the stage 2 output PA space
Date: Sun, 27 Mar 2022 17:24:29 +0300 [thread overview]
Message-ID: <5551410.DvuYhMxLoT@basile.remlab.net> (raw)
In-Reply-To: <20220327093427.1548629-2-idan.horowitz@gmail.com>
Le sunnuntaina 27. maaliskuuta 2022, 12.34.26 EEST Idan Horowitz a écrit :
> As per the AArch64.SS2OutputPASpace() psuedo-code in the ARMv8 ARM when the
> PA space of the IPA is non secure, the output PA space is secure if and only
> if all of the bits VTCR.<NSW, NSA>, VSTCR.<SW, SA> are not set.
>
> Signed-off-by: Idan Horowitz <idan.horowitz@gmail.com>
> ---
> target/arm/helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index 812ca591f4..d0265b760f 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -12697,7 +12697,7 @@ bool get_phys_addr(CPUARMState *env, target_ulong
> address, } else {
> attrs->secure =
> !((env->cp15.vtcr_el2.raw_tcr & (VTCR_NSA |
> VTCR_NSW)) - || (env->cp15.vstcr_el2.raw_tcr &
> VSTCR_SA)); + || (env->cp15.vstcr_el2.raw_tcr &
> (VSTCR_SA | VSTCR_SW))); }
The VTCR_EL2 specification says that the NSA bit "behaves as 1 for all purposes
other than reading back the value of the bit when one of the following is true
(...)
* The value of VTCR_EL2.NSW is 1.
* The value of VSTCR_EL2.SA is 1."
Sorry but I don't see any reason to check the SW bit here.
--
Реми Дёни-Курмон
http://www.remlab.net/
next prev parent reply other threads:[~2022-03-27 14:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-27 9:34 [PATCH 0/3] Bug fixes related to secure 2 stage translation Idan Horowitz
2022-03-27 9:34 ` [PATCH 1/3] target/arm: Check VSTCR.SW when assigning the stage 2 output PA space Idan Horowitz
2022-03-27 14:24 ` Rémi Denis-Courmont [this message]
2022-03-29 14:59 ` Richard Henderson
2022-03-29 14:59 ` Richard Henderson
2022-03-27 9:34 ` [PATCH 2/3] target/arm: Take VSTCR.SW, VTCR.NSW into account in final stage 2 walk Idan Horowitz
2022-03-29 16:36 ` Richard Henderson
2022-03-27 9:34 ` [PATCH 3/3] target/arm: Determine final stage 2 output PA space based on original IPA Idan Horowitz
2022-03-29 19:09 ` Richard Henderson
2022-03-29 20:18 ` Idan Horowitz
2022-03-31 8:46 ` Peter Maydell
2022-03-31 8:46 ` [PATCH 0/3] Bug fixes related to secure 2 stage translation Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2022-03-27 21:45 [PATCH 1/3] target/arm: Check VSTCR.SW when assigning the stage 2 output PA space Idan Horowitz
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=5551410.DvuYhMxLoT@basile.remlab.net \
--to=remi@remlab.net \
--cc=idan.horowitz@gmail.com \
--cc=peter.maydell@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.