[PATCH v3 05/18] KVM: arm64: timers: Allow physical offset without CNTPOFF_EL2
Oliver Upton
oliver.upton at linux.dev
Wed Mar 29 23:42:47 PDT 2023
Hey Marc,
On Fri, Mar 24, 2023 at 02:46:51PM +0000, Marc Zyngier wrote:
> CNTPOFF_EL2 is awesome, but it is mostly vapourware, and no publicly
> available implementation has it. So for the common mortals, let's
> implement the emulated version of this thing.
>
> It means trapping accesses to the physical counter and timer, and
> emulate some of it as necessary.
>
> As for CNTPOFF_EL2, nobody sets the offset yet.
Did you consider implementing a 'fast' exit handler for counter reads?
When I took a stab at this a long time ago I had something similar [*].
Since physical counter emulation is going to effectively be used by all
systems out there right now it might be worth giving the best emulation
implementation we can.
[*]: https://lore.kernel.org/kvmarm/20210916181510.963449-9-oupton@google.com/
--
Thanks,
Oliver
More information about the linux-arm-kernel
mailing list