Skip to content

Commit 4a95a1b

Browse files
author
Marc Zyngier
committed
KVM: arm64: Enable Address Authentication at EL2 if available
While initializing EL2, enable Address Authentication if detected from EL1. We still use the EL1-provided keys though. Acked-by: Andrew Scull <[email protected]> Acked-by: Mark Rutland <[email protected]> Signed-off-by: Marc Zyngier <[email protected]>
1 parent b3a9e3b commit 4a95a1b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/arm64/kvm/hyp-init.S

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ alternative_else_nop_endif
104104
*/
105105
mov_q x4, (SCTLR_EL2_RES1 | (SCTLR_ELx_FLAGS & ~SCTLR_ELx_A))
106106
CPU_BE( orr x4, x4, #SCTLR_ELx_EE)
107+
alternative_if ARM64_HAS_ADDRESS_AUTH
108+
mov_q x5, (SCTLR_ELx_ENIA | SCTLR_ELx_ENIB | \
109+
SCTLR_ELx_ENDA | SCTLR_ELx_ENDB)
110+
orr x4, x4, x5
111+
alternative_else_nop_endif
107112
msr sctlr_el2, x4
108113
isb
109114

0 commit comments

Comments
 (0)