On Fri, Apr 17, 2026 at 05:43:24PM +0100, Alex Bennée wrote:
> If we want more flexibility messing around with page tables lets do it
> without having to rely on assembly for it.
> 
> Signed-off-by: Alex Bennée <[email protected]>
> 
> ---
> AJB
>   - a result of -O0 does mean each helper ends up with a stack frame
>     being needed to do the relatively simple mask and shift. I've
>     experimented with -O1 and trying to manually enable inlining but
>     couldn't get anything to work.
> ---
> +#define DESC_AF          (1ULL << 10)
> +#define DESC_ATTRINDX(i) ((uint64_t)(i) << 2)
> +#define DESC_NS          (1ULL << 5)
> +#define DESC_UXN         (1ULL << 53)
> +#define DESC_PXN         (1ULL << 54)

I *think* you have UXN and PXN the wrong way round? See table D8-52; UXN is 
always 54.
It works fine in this case as we always use them together.

Otherwise,

Reviewed-by: Jim MacArthur <[email protected]>

Reply via email to