[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] target/arm: Pass security space rather than flag for AT
From: |
Peter Maydell |
Subject: |
Re: [PATCH 4/5] target/arm: Pass security space rather than flag for AT instructions |
Date: |
Thu, 20 Jul 2023 18:09:26 +0100 |
On Wed, 19 Jul 2023 at 16:56, Jean-Philippe Brucker
<jean-philippe@linaro.org> wrote:
>
> At the moment we only handle Secure and Nonsecure security spaces for
> the AT instructions. Add support for Realm and Root.
>
> For AArch64, arm_security_space() gives the desired space. ARM DDI0487J
> says (R_NYXTL):
>
> If EL3 is implemented, then when an address translation instruction
> that applies to an Exception level lower than EL3 is executed, the
> Effective value of SCR_EL3.{NSE, NS} determines the target Security
> state that the instruction applies to.
>
> For AArch32, some instructions can access NonSecure space from Secure,
> so we still need to pass the state explicitly to do_ats_write().
>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> ---
> I haven't tested AT instructions in Realm/Root space yet, but it looks
> like the patch is needed. RMM doesn't issue AT instructions like KVM
> does in non-secure state (which triggered the bug in the previous
> patch).
> ---
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
We should also implement the check that the AT S1E[012] ops have
that if FEAT_RME is implemented and SCR_EL3.{NS,NSE} are a reserved
value then the AT insn should UNDEF. But that's a separate patch.
thanks
-- PMM
- [PATCH 0/5] target/arm: Fixes for RME, Jean-Philippe Brucker, 2023/07/19
- [PATCH 4/5] target/arm: Pass security space rather than flag for AT instructions, Jean-Philippe Brucker, 2023/07/19
- Re: [PATCH 4/5] target/arm: Pass security space rather than flag for AT instructions,
Peter Maydell <=
- [PATCH 2/5] target/arm/helper: Fix vae2_tlbmask(), Jean-Philippe Brucker, 2023/07/19
- [PATCH 3/5] target/arm: Skip granule protection checks for AT instructions, Jean-Philippe Brucker, 2023/07/19
- [PATCH 1/5] target/arm/ptw: Load stage-2 tables from realm physical space, Jean-Philippe Brucker, 2023/07/19
- [PATCH 5/5] target/arm/helper: Implement CNTHCTL_EL2.CNT[VP]MASK, Jean-Philippe Brucker, 2023/07/19