diff options
author | Marc Zyngier <maz@kernel.org> | 2023-03-30 20:47:44 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2023-03-30 21:01:09 +0300 |
commit | 2b4825a8694018901e641ccc2eafd0fff58d1415 (patch) | |
tree | a0746e93d0a29d57a8f841bd8ec8776da42a6abc /arch/arm64/kvm/hypercalls.c | |
parent | 326349943ed181890b8b2af2755bd0eac93bd66d (diff) | |
download | linux-2b4825a8694018901e641ccc2eafd0fff58d1415.tar.xz |
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
Diffstat (limited to 'arch/arm64/kvm/hypercalls.c')
-rw-r--r-- | arch/arm64/kvm/hypercalls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hypercalls.c b/arch/arm64/kvm/hypercalls.c index 5da884e11337..39a4707e081d 100644 --- a/arch/arm64/kvm/hypercalls.c +++ b/arch/arm64/kvm/hypercalls.c @@ -47,7 +47,7 @@ static void kvm_ptp_get_time(struct kvm_vcpu *vcpu, u64 *val) cycles = systime_snapshot.cycles - vcpu->kvm->arch.timer_data.voffset; break; case KVM_PTP_PHYS_COUNTER: - cycles = systime_snapshot.cycles; + cycles = systime_snapshot.cycles - vcpu->kvm->arch.timer_data.poffset; break; default: return; |