Improved TLB flushing logic for Supervisor mode#3312
Open
ahmadtkhan wants to merge 4 commits into
Open
Conversation
… of Shared TLB accesses and misses and decreasing PTWs
Contributor
|
To fix Verible, you can run the command which is at the bottom of CONTRIBUTING.md file |
Contributor
|
Hello, can I ask you to fix Verible ? (just execute the Veribla command on your branch) |
Author
|
Hey, sorry for the delay but I completed the PR by adding logic for flush_vvma_i and flush_gvma_i and ran Verible as well. |
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.
Improved TLB flushing logic for Supervisor mode decreasing the number of Shared TLB accesses, misses, and PTWs.
This PR addresses #3286 by changing shared TLB flushing for S-stage translation from coarse invalidation to selective invalidation as S-stage flush invalidated the entire shared TLB in the original design. This patch adds selective flush support for the shared TLB using the flushed address and ASID, using similar flush logic of ITLB/DTLB. The implementation uses a small multi-cycle FSM to walk the shared-TLB sets and clear only matching valid entries instead of dropping the whole structure. This reduces over-invalidation in the shared TLB and preserves unrelated translations.
This PR is limited to S-stage flushing. VS-stage and G-stage cases should be added in a few days after they are validated and tested.