]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: Add MT_S2{,_FWB}_AS_S1 encodings
authorMarc Zyngier <maz@kernel.org>
Fri, 23 Jan 2026 19:16:33 +0000 (19:16 +0000)
committerMarc Zyngier <maz@kernel.org>
Sun, 25 Jan 2026 16:17:21 +0000 (16:17 +0000)
commitd4236f1ef270347b26ed34bcd0eb28d285b86bcb
treec6fc8fbb67bb7315cea930b4f49ca4ba1d206f24
parent9ace4753a5202b02191d54e9fdf7f9e3d02b85eb
arm64: Add MT_S2{,_FWB}_AS_S1 encodings

pKVM usage of S2 translation on the host is purely for isolation
purposes, not translation. To that effect, the memory attributes
being used must be that of S1.

With FWB=0, this is easily achieved by using the Normal Cacheable
type (which is the weakest possible memory type) at S2, and let S1
pick something stronger as required.

With FWB=1, the attributes are combined in a different way, and we
cannot arbitrarily use Normal Cacheable. We can, however, use a
memattr encoding that indicates that the final attributes are that
of Stage-1.

Add these encoding and a few pointers to the relevant parts of the
specification. It might come handy some day.

Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://patch.msgid.link/20260123191637.715429-2-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/memory.h