[kvm-unit-tests PATCH v6 5/5] riscv: sbi: Add test for timer extension
James R T
jamestiotio at gmail.com
Fri Aug 2 05:23:37 PDT 2024
On Fri, Aug 2, 2024 at 4:36 PM Andrew Jones <andrew.jones at linux.dev> wrote:
>
> 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.
>
Sure, I will reopen the clarification PR and work on it.
> I also moved some code around a bit and a couple other minor cleanups.
>
> And (drum roll, please), it's now merged!
Awesome, thanks Andrew!
>
> Thanks,
> drew
Best regards,
James Raphael Tiovalen
More information about the kvm-riscv
mailing list