Skip to content

perf(VMProm): refactor the TLB - #273

Merged
tperami merged 1 commit into
ndctxt-encodingfrom
tlb-refactor
Oct 2, 2026
Merged

tperami merged 1 commit into
ndctxt-encodingfrom
tlb-refactor

Conversation

@tperami

@tperami tperami commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

This is a quite big refactor, however more than half the diff in
VMPromising.v is just moving the TState after the TLB.

The main gist is that now the TLB is part of the TState for performance,
although it can be recomputed from the register and memory state at any point.
The TLB also contains information about all timestamps instead of just
one.

The 3 BBM mode are gone, and the BBM checker is either on or off.
Entries that a not-present can't be in conflict. If that is important
for proofs, the proof should have a precondition that all page table are
present.

This PR is part of a stack containing 4 PRs:

  1. main
  2. perf(Prom): Make reading memory faster #263
  3. perf(Prom): Optimize forwarding #265
  4. perf(VMProm): Hopefully make NDCtxt.t indexing faster #272
  5. "perf(VMProm): refactor the TLB" (this PR)

@tperami
tperami added this pull request to stack #266 September 24, 2026 15:10
@tperami
tperami marked this pull request as draft September 24, 2026 15:10
@tperami
tperami force-pushed the tlb-refactor branch 2 times, most recently from 5491ff3 to 61b6e25 Compare September 25, 2026 17:09
@tperami

tperami commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator Author

The BBM checker has a bug where it will miss a conflict between a global page entry and an ASID-specific block entry that overlap. I'm writing this to record it because I'm not sure if we have a test for that.

@tperami

tperami commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator Author

Otherwise, @febyeji it's ready for review

@tperami
tperami marked this pull request as ready for review September 25, 2026 17:14
Comment thread ArchSem/GenPromising.v Outdated
Comment thread ArchSemArm/VMPromising.v Outdated
Comment thread ArchSemArm/VMPromising.v
Comment thread ArchSemArm/VMPromising.v Outdated
Comment thread ArchSemArm/tests/VMPromisingTest.v Outdated

@febyeji febyeji left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. This can be merged after the tests are uncommented.

@tperami
tperami force-pushed the tlb-refactor branch 4 times, most recently from cd59596 to 8efa1c9 Compare October 2, 2026 12:49
@tperami
tperami added this pull request to the merge queue Oct 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Oct 2, 2026
This is a quite big refactor, however more than half the diff in 
VMPromising.v is just moving the TState after the TLB.

The main gist is that now the TLB is part of the TState for performance,
although it can be recomputed from the register and memory state at any point.
The TLB also contains information about all timestamps instead of just
one.

The 3 BBM mode are gone, and the BBM checker is either on or off.
Entries that a not-present can't be in conflict. If that is important
for proofs, the proof should have a precondition that all page table are
present.
@tperami
tperami added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit acee669 Oct 2, 2026
2 checks passed
@tperami
tperami deleted the tlb-refactor branch October 2, 2026 13:48
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