Skip to content
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

fix(ICache,ITLB): also flush itlb pipe when prefetchPipe s1_flush #3996

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

ngc7331
Copy link
Member

@ngc7331 ngc7331 commented Dec 7, 2024

ITLB does not store gpaddr to save resources, instead it takes gpaddr from L2TLB when gpf occurs, which poses a two-option requirement for the requestor (i.e. IPrefetchPipe):

  1. resend the same itlb.io.req.vaddr until itlb.io.resp.miss is pulled down
  2. flush gpf entry in ITLB by pulling up itlb.io.flushPipe

Otherwise, ITLB is unable to handle the next gpf and the core hangs.

However, the first point cannot be guaranteed during the speculative execution, as IPrefetchPipe sends request to ITLB at s0 stage and may receive a flush request from BPU s3 stage, IFU or Backend at s1 stage, then the same vaddr is never resend to ITLB.

Therefore, we must ensure that ITLB is flushed synchronously when IPrefetchPipe s1 stage is flushed, thus satisfying the second point. This PR implements this.

@XiangShanRobot
Copy link

[Generated by IPC robot]
commit: 60dd0f6

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
60dd0f6 1.959 0.450 2.686 1.229 2.832 2.461 2.393 0.919 1.407 1.992 3.435 2.704 2.383 3.261

master branch:

commit astar copy_and_run coremark gcc gromacs lbm linux mcf microbench milc namd povray wrf xalancbmk
7d20eb3 1.959 0.450 2.686 1.226 2.832 2.461 2.393 0.919 1.407 1.992 3.435 2.709 2.383 3.261
35477a7
493f6e1 1.959 0.450 2.686 1.224 2.832 2.461 2.393 0.919 1.407 1.992 3.435 2.709 2.383 3.261
a60d667
7876e67

@ngc7331 ngc7331 marked this pull request as ready for review December 9, 2024 02:37
@ngc7331 ngc7331 requested a review from eastonman as a code owner December 9, 2024 02:37
@good-circle good-circle self-requested a review December 9, 2024 02:37
@good-circle
Copy link
Contributor

Already passed tests in simulation accelerator

Copy link
Member

@eastonman eastonman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Tang-Haojin Tang-Haojin merged commit fad7803 into master Dec 9, 2024
9 checks passed
@Tang-Haojin Tang-Haojin deleted the fix-itlb-flushpipe branch December 9, 2024 03:11
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.

5 participants