Add Hypervisor test macros for VS and VU mode - #53
Open
Nadime Barhoumi (nadime15) wants to merge 3 commits into
Open
Add Hypervisor test macros for VS and VU mode#53Nadime Barhoumi (nadime15) wants to merge 3 commits into
Nadime Barhoumi (nadime15) wants to merge 3 commits into
Conversation
user (VU) modes by extending the test environment with H-extension infrastructure. Changes: - Add RVTEST_RV64VS and RVTEST_RV64VU top-level test macros - Add INIT_HGATP to initialize hgatp to bare mode at reset - Extend DELEGATE_NO_TRAPS to also clear hedeleg, hideleg, and hie - Add RVTEST_ENABLE_VIRTUAL_SUPERVISOR and RVTEST_ENABLE_VIRTUAL_USER for transitioning from M-mode to VS/VU mode via MRET - Add RVTEST_ENABLE_VIRTUAL_SUPERVISOR_FROM_HS and RVTEST_ENABLE_VIRTUAL_USER_FROM_HS for transitioning from HS-mode to VS/VU mode via SRET - Add RVTEST_ENABLE_USER and RVTEST_ENABLE_USER_FROM_SUPERVISOR - Add CAUSE_VIRTUAL_SUPERVISOR_ECALL to trap vector so VS-mode tests can pass/fail via ecall - Delegate guest-page-fault causes (load, store, fetch) to HS-mode in the default medeleg setup
Member
|
Have you written tests that successfully make use of these macros? |
Author
|
Yes, I tested them. I'm just unsure about the following macro names: What do you think about these names? Do they seem clear and consistent, or would you suggest something different? |
On RV32, MPV lives in mstatush not mstatus. Use SET_MPV helper macro to write the correct CSR based on XLEN.
Member
|
I think so. Maybe we could get some more feedback from others if you also make a PR that contributes your new tests. |
Author
|
Ok sure, will do. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for running tests in virtual supervisor (VS) and virtual user (VU) modes by extending the test environment with H-extension infrastructure.
Changes: