]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
arm64: Rework ARM_ERRATUM_1414080 handling
authorMarc Zyngier <maz@kernel.org>
Mon, 6 Jul 2020 16:38:02 +0000 (17:38 +0100)
committerWill Deacon <will@kernel.org>
Wed, 8 Jul 2020 21:07:19 +0000 (22:07 +0100)
commitdc802f2bc0208f4abca420705a860c5175db4bee
tree54624c34689321f23e0d19637a891199a6cda0db
parent4b661d6133c5d3a7c9aca0b4ee5a78c7766eff3f
arm64: Rework ARM_ERRATUM_1414080 handling

The current handling of erratum 1414080 has the side effect that
cntkctl_el1 can get changed for both 32 and 64bit tasks.

This isn't a problem so far, but if we ever need to mitigate another
of these errata on the 64bit side, we'd better keep the messing with
cntkctl_el1 local to 32bit tasks.

For that, make sure that on entering the kernel from a 32bit tasks,
userspace access to cntvct gets enabled, and disabled returning to
userspace, while it never gets changed for 64bit tasks.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20200706163802.1836732-5-maz@kernel.org
[will: removed branch instructions per Mark's review comments]
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/entry.S