From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, philmd@linaro.org, qemu-arm@nongnu.org
Subject: Re: [PATCH] target/arm: Two fixes for secure ptw
Date: Fri, 4 Nov 2022 07:30:13 +1100 [thread overview]
Message-ID: <2d9a7f5e-0ec0-89da-53f0-b5624f540ae8@linaro.org> (raw)
In-Reply-To: <CAFEAcA_meGSRv=Fa1D-F=a3VF=TnHHORGAZoi5aPOkVAbGPm4w@mail.gmail.com>
On 11/4/22 00:19, Peter Maydell wrote:
>> @@ -2671,6 +2671,13 @@ static bool get_phys_addr_with_struct(CPUARMState *env, S1Translate *ptw,
>> bool is_secure = ptw->in_secure;
>> ARMMMUIdx s1_mmu_idx;
>>
>> + /*
>> + * The page table entries may downgrade secure to non-secure, but
>> + * cannot upgrade an non-secure translation regime's attributes
>> + * to secure.
>> + */
>> + result->f.attrs.secure = is_secure;
>> +
>> switch (mmu_idx) {
>> case ARMMMUIdx_Phys_S:
>> case ARMMMUIdx_Phys_NS:
>> @@ -2712,12 +2719,6 @@ static bool get_phys_addr_with_struct(CPUARMState *env, S1Translate *ptw,
>> break;
>> }
>>
>> - /*
>> - * The page table entries may downgrade secure to non-secure, but
>> - * cannot upgrade an non-secure translation regime's attributes
>> - * to secure.
>> - */
>> - result->f.attrs.secure = is_secure;
>> result->f.attrs.user = regime_is_user(env, mmu_idx);
>
> Do we also need to move this setting of attrs.user ?
> get_phys_addr_disabled() doesn't set that either.
I don't think so. The only cases which don't pass through the setting of attrs.user are
the two Phys mmu_idx. Which was by design per the comment up there about artificially
deciding which EL regime they belong to.
r~
next prev parent reply other threads:[~2022-11-03 20:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 5:47 [PATCH] target/arm: Two fixes for secure ptw Richard Henderson
2022-11-02 9:02 ` Philippe Mathieu-Daudé
2022-11-03 13:19 ` Peter Maydell
2022-11-03 13:23 ` Peter Maydell
2022-11-03 20:30 ` Richard Henderson [this message]
2022-11-04 10:58 ` Peter Maydell
2022-11-04 22:06 ` Richard Henderson
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=2d9a7f5e-0ec0-89da-53f0-b5624f540ae8@linaro.org \
--to=richard.henderson@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=philmd@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).