[PATCH v3 05/18] KVM: arm64: timers: Allow physical offset without CNTPOFF_EL2
Marc Zyngier
maz at kernel.org
Thu Mar 30 03:09:35 PDT 2023
On Thu, 30 Mar 2023 07:42:47 +0100,
Oliver Upton <oliver.upton at linux.dev> wrote:
>
> 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.
Indeed, I have some of that in the NV code, which needs to be
augmented. I'm not sure any guest deeply cares about the physical
counter outside of NV, but I'm happy to hack something together if
someone screams loudly enough!
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list