We currently use the same Arm generic time in both userspace and the
kernel. As we always enable userspace access to the virtual timer we
can tell userspace to use it.
Sponsored by: Arm Ltd
Differential D41565
arm: Add a userspace physical timer check andrew on Aug 23 2023, 2:14 PM. Authored by Tags None Referenced Files
Subscribers
Details
We currently use the same Arm generic time in both userspace and the Sponsored by: Arm Ltd
Diff Detail
Event TimelineComment Actions I'm afraid that using virtual time outside the hypervisor environment is somewhat problematic, or creates a new (not always fulfilled) dependency on firmware. The virtual timer uses the value stored in CNTVOFF as an offset to generate the timer value. CNTVOFF is stored in a bank with an undefined reset value, so it *MUST* be initialized, otherwise we can end up with a situation where each core will have a different, non-zero value - so each core will have a different time. So the actual code expects someone (firmware, hypervisor) to initialize CNTVOFF on all cores - which is not always true (or better said, it is uncommon in the ARMv7 world and guaranteed in ARM64 ). Another problem is that CNTVOFF is only accessible from hypervisor mode - it cannot be expected to always be accessible from the kernel. So I think this change does no good and just creates problems. |