Conversation
Keep load and store translations on the original shared data TLB by default, while providing an explicit KMHv3 switch for independent store-side L1 ownership. The mismatch document explains both modes, their performance tradeoffs, and the remaining RTL approximation. Constraint: The committed tree must be based on the latest origin/xs-dev Constraint: Keep unrelated user files untracked Rejected: Enable the store TLB unconditionally | changes established gem5 behavior and performance baselines Rejected: Build the second TLB dynamically | gem5 SimObject and port topology is static after configuration Confidence: high Scope-risk: moderate Directive: Keep enable_store_tlb default false and update the mismatch document when routing semantics change Tested: Rebased onto origin/xs-dev; git diff --check; Python syntax; default/split parameter probe; KMHv3 CLI help; scons build/RISCV/gem5.opt --gold-linker -j64 Not-tested: Checkpoint-based functional and performance A/B regression Change-Id: I45730e7bd604f89bad831ef5e26926098b79f1e4 Co-authored-by: OmX <omx@oh-my-codex.dev>
📝 WalkthroughWalkthroughAdds an optional split store-side TLB to the RISC-V MMU, routes write translations to ChangesStore TLB Support
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant CPU
participant RiscvMMU
participant DTB
participant STB
participant WalkerXBar
CPU->>RiscvMMU: issue data translation
RiscvMMU->>DTB: route read translation
RiscvMMU->>STB: route write translation when enabled
DTB->>WalkerXBar: submit page-table walk
STB->>WalkerXBar: submit page-table walk
WalkerXBar-->>RiscvMMU: return walker response
RiscvMMU-->>CPU: return translation
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/design-docs/mismatch/dtlb-rtl-mismatch.md`:
- Around line 206-211: Update the split-mode comparison in the sections around
the `sttlb` lookup description and its corresponding summary so both modes are
described as performing one L1 lookup per store. Explain only that split mode
cannot reuse the load-side `dtb` entry and may consequently incur an additional
store-side miss/replay; remove the claim that it performs an extra store-side
lookup.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 9cd3879a-5404-4897-a2c4-324e2a04cf99
📒 Files selected for processing (11)
configs/common/xiangshan.pyconfigs/example/idealkmhv3.pyconfigs/example/kmhv3.pydocs/design-docs/README.mddocs/design-docs/mismatch/dtlb-rtl-mismatch.mdsrc/arch/generic/mmu.hhsrc/arch/riscv/RiscvMMU.pysrc/arch/riscv/mmu.hhsrc/arch/riscv/pagetable_walker.ccsrc/arch/riscv/pagetable_walker.hhsrc/arch/riscv/tlb.cc
🚀 Coremark Smoke Test Results
✅ Difftest smoke test passed! |
Keep load and store translations on the original shared data TLB by default, while providing an explicit KMHv3 switch for independent store-side L1 ownership. The mismatch document explains both modes, their performance tradeoffs, and the remaining RTL approximation.
Summary by CodeRabbit
New Features
--enable-store-tlb.Bug Fixes
Documentation