KVM: arm64: timers: Use CNTPOFF_EL2 to offset the physical timer
authorMarc Zyngier <maz@kernel.org>
Thu, 30 Mar 2023 17:47:44 +0000 (18:47 +0100)
committerMarc Zyngier <maz@kernel.org>
Thu, 30 Mar 2023 18:01:09 +0000 (19:01 +0100)
commit2b4825a8694018901e641ccc2eafd0fff58d1415
treea0746e93d0a29d57a8f841bd8ec8776da42a6abc
parent326349943ed181890b8b2af2755bd0eac93bd66d
KVM: arm64: timers: Use CNTPOFF_EL2 to offset the physical timer

With ECV and CNTPOFF_EL2, it is very easy to offer an offset for
the physical timer. So let's do just that.

Nothing can set the offset yet, so this should have no effect
whatsoever (famous last words...).

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