Add arch_timer_edge_cases selftest to test various corner cases of the ARM timers such as: * timers above the max TVAL value * timers in the past * moving counters ahead and behind pending timers * reprogramming timers * timers fired multiple times * masking/unmasking using the timer control mask These are intentionally unusual scenarios to stress compliance with the arm architecture. v5: * Drop previous patch 1 standardizing GIC addresses as this has now been done by another series * Fix shortlog message for patch on arch_timer test * Comment ISB use appropriately * Rename gic_wfi() helper to wfi() as WFI instructions don't imply a GIC v4: https://lore.kernel.org/kvmarm/20240307183907.1184775-1-coltonlewis@xxxxxxxxxx/ v3: https://lore.kernel.org/kvmarm/20231103192915.2209393-1-coltonlewis@xxxxxxxxxx/ v2: https://lore.kernel.org/kvmarm/20230928210201.1310536-1-coltonlewis@xxxxxxxxxx/ v1: https://lore.kernel.org/kvm/20230516213731.387132-1-coltonlewis@xxxxxxxxxx/ Colton Lewis (2): KVM: selftests: Ensure pending interrupts are handled in arch_timer test KVM: arm64: selftests: Add arch_timer_edge_cases selftest tools/testing/selftests/kvm/Makefile | 1 + .../kvm/aarch64/arch_timer_edge_cases.c | 1099 +++++++++++++++++ .../testing/selftests/kvm/aarch64/vgic_irq.c | 11 +- .../kvm/include/aarch64/arch_timer.h | 18 +- .../selftests/kvm/include/aarch64/processor.h | 3 + .../selftests/kvm/lib/aarch64/processor.c | 6 + 6 files changed, 1131 insertions(+), 7 deletions(-) create mode 100644 tools/testing/selftests/kvm/aarch64/arch_timer_edge_cases.c -- 2.46.0.76.ge559c4bf1a-goog