KVM: arm64: timers: Use a per-vcpu, per-timer accumulator for fractional ns
authorMarc Zyngier <maz@kernel.org>
Thu, 30 Mar 2023 17:47:41 +0000 (18:47 +0100)
committerMarc Zyngier <maz@kernel.org>
Thu, 30 Mar 2023 18:01:09 +0000 (19:01 +0100)
commit0d0ae656b71155ccc0be9388beef77a1f7e7558e
tree730aaccc2d4e322717589caa4f9e09ead005ab77
parente8d018dd0257f744ca50a729e3d042cf2ec9da65
KVM: arm64: timers: Use a per-vcpu, per-timer accumulator for fractional ns

Instead of accumulating the fractional ns value generated every time
we compute a ns delta in a global variable, use a per-vcpu, per-timer
variable. This keeps the fractional ns local to the timer instead of
contributing to any odd, unrelated timer.

Reviewed-by: Colton Lewis <coltonlewis@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230330174800.2677007-2-maz@kernel.org
arch/arm64/kvm/arch_timer.c
include/kvm/arm_arch_timer.h