[kvm-unit-tests PATCH v6 5/5] riscv: sbi: Add test for timer extension
Andrew Jones
andrew.jones at linux.dev
Fri Aug 2 01:36:42 PDT 2024
On Tue, Jul 30, 2024 at 02:18:20PM GMT, James Raphael Tiovalen wrote:
> Add a test for the set_timer function of the time extension. The test
> checks that:
> - The time extension is available
> - The installed timer interrupt handler is called
> - The timer interrupt is received within a reasonable time interval
> - The timer interrupt pending bit is cleared after the set_timer SBI
> call is made
> - The timer interrupt can be cleared either by requesting a timer
> interrupt infinitely far into the future or by masking the timer
> interrupt
I've modified the "or by masking the timer interrupt" test to work as I'd
expect it to based on a bit more thought about what the SBI TIME extension
spec is trying to say (we should clarify the spec with the PR you've
written). I also added a test for ensuring a timer is pending immediately
when setting the time with a value of zero. All tests pass.
I also moved some code around a bit and a couple other minor cleanups.
And (drum roll, please), it's now merged!
Thanks,
drew
More information about the kvm-riscv
mailing list