[PATCH] arm64: Implement prctl(PR_{G,S}ET_TSC)
Marc Zyngier
maz at kernel.org
Sun Apr 28 03:37:34 PDT 2024
On Sat, 27 Apr 2024 06:27:51 +0100,
Peter Collingbourne <pcc at google.com> wrote:
>
> On arm64, this prctl controls access to CNTVCT_EL0, CNTVCTSS_EL0 and
> CNTFRQ_EL0 via CNTKCTL_EL1.EL0VCTEN. Since this bit is also used to
> implement various erratum workarounds, check whether the CPU needs
> a workaround whenever we potentially need to change it.
Why would we ever consider preventing access to CNTVTL_EL0? This
register is part of the arm64 ABI, together with CNTFRQ_EL0.
Disabling it also prevents the VDSO from working correctly, making
something as simple as getttimeofday() unexpectedly fail.
I'm sure you have some rationale behind it, but it is nowhere to be
found above, and I cannot see why we'd want to mimic whatever x86
does.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list