diff options
author | Marc Zyngier <maz@kernel.org> | 2023-03-30 19:47:41 +0200 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2023-03-30 20:01:09 +0200 |
commit | 0d0ae656b71155ccc0be9388beef77a1f7e7558e (patch) | |
tree | 730aaccc2d4e322717589caa4f9e09ead005ab77 /arch/arm64 | |
parent | Linux 6.3-rc3 (diff) | |
download | linux-0d0ae656b71155ccc0be9388beef77a1f7e7558e.tar.xz linux-0d0ae656b71155ccc0be9388beef77a1f7e7558e.zip |
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
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/kvm/arch_timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/arch_timer.c b/arch/arm64/kvm/arch_timer.c index e1af4301b913..9515c645f03d 100644 --- a/arch/arm64/kvm/arch_timer.c +++ b/arch/arm64/kvm/arch_timer.c @@ -212,7 +212,7 @@ static u64 kvm_counter_compute_delta(struct arch_timer_context *timer_ctx, ns = cyclecounter_cyc2ns(timecounter->cc, val - now, timecounter->mask, - &timecounter->frac); + &timer_ctx->ns_frac); return ns; } |