Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a7107232 authored by Will Deacon's avatar Will Deacon Committed by Channagoud Kadabi
Browse files

UPSTREAM: arm64: entry: Add fake CPU feature for unmapping the kernel at EL0



Allow explicit disabling of the entry trampoline on the kernel command
line (kpti=off) by adding a fake CPU feature (ARM64_UNMAP_KERNEL_AT_EL0)
that can be used to toggle the alternative sequences in our entry code and
avoid use of the trampoline altogether if desired. This also allows us to
make use of a static key in arm64_kernel_unmapped_at_el0().

Reviewed-by: default avatarMark Rutland <mark.rutland@arm.com>
Tested-by: default avatarLaura Abbott <labbott@redhat.com>
Tested-by: default avatarShanker Donthineni <shankerd@codeaurora.org>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
(cherry picked from commit ea1e3de85e94d711f63437c04624aa0e8de5c8b3)

[toddpoynor@google.com: fixup context, cpus_have_const_cap ->
cpus_have_cap]
Change-Id: I72936d608b0d4c0dd9725eced7674b95e4abcf2d
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Git-commit: f79ff2d8
Git-repo: https://android.googlesource.com/kernel/common/


[ckadabi@codeaurora.org: Update ARM64_NCAPS and ARM64_UNMAP_KERNEL_AT_EL0
values based on current supported capabilities]
Signed-off-by: default avatarChannagoud Kadabi <ckadabi@codeaurora.org>
parent c207413c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment