* [PATCH kvm-unit-tests] arm64: timer: Use correct counter for !pending_before
@ 2017-08-03 6:25 Christoffer Dall
2017-08-03 13:09 ` Radim Krčmář
0 siblings, 1 reply; 2+ messages in thread
From: Christoffer Dall @ 2017-08-03 6:25 UTC (permalink / raw)
To: kvm, kvmarm
Cc: Andrew Jones, Paolo Bonzini, Radim Krčmář,
Marc Zyngier, Christoffer Dall
We were using the virtual counter to calculate a timer cval which is 10
seconds in the future, but this obviously doesn't work for the physical
timer which is bases on the physical counter.
Make sure we use a properly paired timer/counter pair.
Reported-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
---
arm/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arm/timer.c b/arm/timer.c
index e824338..4cdca9e 100644
--- a/arm/timer.c
+++ b/arm/timer.c
@@ -174,7 +174,7 @@ static bool test_cval_10msec(struct timer_info *info)
static void test_timer(struct timer_info *info)
{
- u64 now = read_sysreg(cntvct_el0);
+ u64 now = info->read_counter();
u64 time_10s = read_sysreg(cntfrq_el0) * 10;
u64 later = now + time_10s;
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH kvm-unit-tests] arm64: timer: Use correct counter for !pending_before
2017-08-03 6:25 [PATCH kvm-unit-tests] arm64: timer: Use correct counter for !pending_before Christoffer Dall
@ 2017-08-03 13:09 ` Radim Krčmář
0 siblings, 0 replies; 2+ messages in thread
From: Radim Krčmář @ 2017-08-03 13:09 UTC (permalink / raw)
To: Christoffer Dall; +Cc: kvm, kvmarm, Andrew Jones, Paolo Bonzini, Marc Zyngier
2017-08-03 08:25+0200, Christoffer Dall:
> We were using the virtual counter to calculate a timer cval which is 10
> seconds in the future, but this obviously doesn't work for the physical
> timer which is bases on the physical counter.
>
> Make sure we use a properly paired timer/counter pair.
>
> Reported-by: Andrew Jones <drjones@redhat.com>
> Signed-off-by: Christoffer Dall <cdall@linaro.org>
> ---
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-03 13:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-03 6:25 [PATCH kvm-unit-tests] arm64: timer: Use correct counter for !pending_before Christoffer Dall
2017-08-03 13:09 ` Radim Krčmář
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox