KVM: arm64: selftests: Add arch_timer_edge_cases selftest
authorColton Lewis <coltonlewis@google.com>
Fri, 23 Aug 2024 17:58:36 +0000 (17:58 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 30 Aug 2024 08:04:16 +0000 (09:04 +0100)
commit54306f564441f6bc99514af45552236f28b1768d
treed01aa5e8c9e88971769bd1fde841be99bf859f13
parentca1a18368d764f9b29ab0c79b3ddd712f5511855
KVM: arm64: selftests: Add arch_timer_edge_cases selftest

Add a new arch_timer_edge_cases selftests that validates:

* timers above the max TVAL value
* timers in the past
* moving counters ahead and behind pending timers
* reprograming timers
* timers fired multiple times
* masking/unmasking using the timer control mask

These are intentionally unusual scenarios to stress compliance with
the arm architecture.

Co-developed-by: Ricardo Koller <ricarkol@google.com>
Signed-off-by: Ricardo Koller <ricarkol@google.com>
Signed-off-by: Colton Lewis <coltonlewis@google.com>
Link: https://lore.kernel.org/r/20240823175836.2798235-3-coltonlewis@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/aarch64/arch_timer_edge_cases.c [new file with mode: 0644]
tools/testing/selftests/kvm/include/aarch64/arch_timer.h