diff options
author | Wei Huang | 2019-03-29 15:12:53 -0500 |
---|---|---|
committer | Marc Zyngier | 2019-03-30 10:06:00 +0000 |
commit | 8fa76162487143d202db20ce84e12061b671a058 (patch) | |
tree | 09aa11fc53786a4e0079683f16752899f4fd875b /mm/mmap.c | |
parent | 8324c3d518cfd69f2a17866b52c13bf56d3042d8 (diff) |
KVM: arm/arm64: arch_timer: Fix CNTP_TVAL calculation
Recently the generic timer test of kvm-unit-tests failed to complete
(stalled) when a physical timer is being used. This issue is caused
by incorrect update of CNTP_CVAL when CNTP_TVAL is being accessed,
introduced by 'Commit 84135d3d18da ("KVM: arm/arm64: consolidate arch
timer trap handlers")'. According to Arm ARM, the read/write behavior
of accesses to the TVAL registers is expected to be:
* READ: TimerValue = (CompareValue – (Counter - Offset)
* WRITE: CompareValue = ((Counter - Offset) + Sign(TimerValue)
This patch fixes the TVAL read/write code path according to the
specification.
Fixes: 84135d3d18da ("KVM: arm/arm64: consolidate arch timer trap handlers")
Signed-off-by: Wei Huang <wei@redhat.com>
[maz: commit message tidy-up]
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'mm/mmap.c')
0 files changed, 0 insertions, 0 deletions