[RFC PATCH 2/7] target/cpu: Add two new address spaces for FEAT_MEC

Gustavo Romero posted 7 patches 2 weeks, 4 days ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>
[RFC PATCH 2/7] target/cpu: Add two new address spaces for FEAT_MEC
Posted by Gustavo Romero 2 weeks, 4 days ago
Add two new address spaces for FEAT_MEC. One is used to store the
substitute encrypted page, which is returned instead of the actual
encrypted page in case of a MECID mismatch. The other is used to store
the MECIDs themselves, associated with physical addresses.

Signed-off-by: Gustavo Bueno <gustavo.romero@linaro.org>
---
 target/arm/cpu.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 657ff4ab20..87c1787c9b 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -2364,7 +2364,9 @@ typedef enum ARMASIdx {
     ARMASIdx_S = 1,
     ARMASIdx_TagNS = 2,
     ARMASIdx_TagS = 3,
-    ARMASIdx_MAX = ARMASIdx_TagS
+    ARMASIdx_MEC = 4,
+    ARMASIdx_MEC_PAGE = 5,
+    ARMASIdx_MAX = ARMASIdx_MEC_PAGE
 } ARMASIdx;
 
 static inline ARMMMUIdx arm_space_to_phys(ARMSecuritySpace space)
-- 
2.34.1
Re: [RFC PATCH 2/7] target/cpu: Add two new address spaces for FEAT_MEC
Posted by Richard Henderson 1 week, 3 days ago
On 3/19/26 12:23, Gustavo Romero wrote:
> Add two new address spaces for FEAT_MEC. One is used to store the
> substitute encrypted page, which is returned instead of the actual
> encrypted page in case of a MECID mismatch. The other is used to store
> the MECIDs themselves, associated with physical addresses.
> 
> Signed-off-by: Gustavo Bueno <gustavo.romero@linaro.org>
> ---
>   target/arm/cpu.h | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/target/arm/cpu.h b/target/arm/cpu.h
> index 657ff4ab20..87c1787c9b 100644
> --- a/target/arm/cpu.h
> +++ b/target/arm/cpu.h
> @@ -2364,7 +2364,9 @@ typedef enum ARMASIdx {
>       ARMASIdx_S = 1,
>       ARMASIdx_TagNS = 2,
>       ARMASIdx_TagS = 3,
> -    ARMASIdx_MAX = ARMASIdx_TagS
> +    ARMASIdx_MEC = 4,
> +    ARMASIdx_MEC_PAGE = 5,
> +    ARMASIdx_MAX = ARMASIdx_MEC_PAGE
>   } ARMASIdx;
>   
>   static inline ARMMMUIdx arm_space_to_phys(ARMSecuritySpace space)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~