mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
CNTVCT_EL0 or CNTPCT_EL0 counter read in Cortex-A73 (all versions) might return a wrong value when the counter crosses a 32bit boundary. Until now, there is no case for Xen itself to access CNTVCT_EL0, and it also should be the Guest OS's responsibility to deal with this part. But for CNTPCT, there exists several cases in Xen involving reading CNTPCT, so a possible workaround is that performing the read twice, and to return one or the other depending on whether a transition has taken place. Signed-off-by: Penny Zheng <penny.zheng@arm.com> Reviewed-by: Wei Chen <Wei.Chen@arm.com> Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com> Acked-by: Julien Grall <jgrall@amazon.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org>