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@xxxxxxxxxx/ -- Thanks, Oliver