-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clint interrupts virtualization #199
Conversation
efee9d6
to
fa21968
Compare
62d5a78
to
b1934dc
Compare
To verify correctness of interrupt virtualization, we should test some corner cases that are not currently addressed by firmware payloads This tests verify that for virtualized m-mode interrupts from CLINT (timer&software) priority is right (e.g if two interrupts are pending simultaniously, MSI will be delivered before MTI), interrupt will be raised again if not cleared in trap handler, and that MSIs work overall (albeit that should already be covered by zephyr)
Works in CI, doesn't work on the board
Added timer tests to CI Tidied up the code a bit
This commit resolves two issues with timer virtualization: 1. Fixed a timer delay that was too large, ensuring test success regardless of log level. 2. Corrected a bug where the MPIE value was being overwritten, which for some reason affected only Spike. Additionally, now firmware cannot delegate MSI and MTI.
b1934dc
to
460f09c
Compare
Changes Made
Questions/Considerations
I am open to any suggestions or notes for polishing the code, as it may still be a bit raw at this stage. Thank you for your review! P.S. Checks fail at the past commits, i'll deal with it a bit later, otherwise ready for review. |
Thanks for the work! |
I spent some time working on the interrupts, I changed how we handle them in Miralis quite a bit (to add a proper virtualization layer, we don't re-inject the values from the trap-info anymore but we manually emulate the trap when the conditions are satisfied). I ended up using your code during the re-factoring so I will close this PR in favor of #257. I need to test on the board but I think we might finally have a version that works on the board without patching Linux :) Thanks a lot for all of the work on this, the tests in particular were super helpful and helped me catch a lot of bugs :) |
Draft PR: Hopefully partially solves #186 (MEI is yet to implement).