Files
linux/arch/arm64/include/asm
Marc Zyngier 47053904e1 KVM: arm64: timers: Convert per-vcpu virtual offset to a global value
Having a per-vcpu virtual offset is a pain. It needs to be synchronized
on each update, and expands badly to a setup where different timers can
have different offsets, or have composite offsets (as with NV).

So let's start by replacing the use of the CNTVOFF_EL2 shadow register
(which we want to reclaim for NV anyway), and make the virtual timer
carry a pointer to a VM-wide offset.

This simplifies the code significantly. It also addresses two terrible bugs:

- The use of CNTVOFF_EL2 leads to some nice offset corruption
  when the sysreg gets reset, as reported by Joey.

- The kvm mutex is taken from a vcpu ioctl, which goes against
  the locking rules...

Reported-by: Joey Gouly <[email protected]>
Reviewed-by: Reiji Watanabe <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Tested-by: Joey Gouly <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Oliver Upton <[email protected]>
2023-03-11 02:00:40 -08:00
..
…
…
…
…
…
…
2022-04-13 12:16:00 -07:00
2022-06-23 18:22:44 +01:00
…
…
…
…
…
…
2021-10-21 10:45:22 +01:00
…
…
2023-01-24 11:49:43 +00:00
…
…
…
…
…
…
2022-07-22 17:34:57 -05:00
2022-02-19 11:11:09 +01:00
…
…
2022-08-23 11:02:02 +01:00
…
…
…
…
2022-09-16 12:17:03 +01:00
…