Skip to content

Improved TLB flushing logic for Supervisor mode#3312

Open
ahmadtkhan wants to merge 4 commits into
openhwgroup:masterfrom
ahmadtkhan:master
Open

Improved TLB flushing logic for Supervisor mode#3312
ahmadtkhan wants to merge 4 commits into
openhwgroup:masterfrom
ahmadtkhan:master

Conversation

@ahmadtkhan
Copy link
Copy Markdown

Improved TLB flushing logic for Supervisor mode decreasing the number of Shared TLB accesses, misses, and PTWs.

  • I have searched for similar pull requests
  • I am a human engaging in an interpersonal interaction. During this interaction, my words are my own and are not generated. If relevant, I provide links to my sources.

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.

… of Shared TLB accesses and misses and decreasing PTWs
@ahmadtkhan ahmadtkhan requested a review from JeanRochCoulon as a code owner May 9, 2026 04:18
@JeanRochCoulon
Copy link
Copy Markdown
Contributor

To fix Verible, you can run the command which is at the bottom of CONTRIBUTING.md file

@JeanRochCoulon
Copy link
Copy Markdown
Contributor

Hello, can I ask you to fix Verible ? (just execute the Veribla command on your branch)

@ahmadtkhan
Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants