Repository navigation
lsu: don't substitute FP store data for the walker's PTE write - #1931
Merged
rosethompson merged 6 commits intoOct 15, 2026
Merged
Conversation
FpLoadStoreM selected the FP write data even while the HPTW owned the LSU, so an A/D-update walk started by an FP load/store (or with fclass/fmv.x in M) wrote the FP register into the PTE. Gate the select with ~SelHPTW and add the fpADUpdate test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: David Harris <David_Harris@hmc.edu>
The previous commit gated only the FLEN >= XLEN store-data mux. On F-only configs with XLEN=64 (f_rv64gc, fh_rv64gc) the FLEN < XLEN mux still selected the FPU's store data for the walker's PTE write, so fsw/flw to a page needing an A/D update wrote the FP register into the PTE. Define LSUFpLoadStoreM = FpLoadStoreM & ~SelHPTW once and use it for both store-data muxes, the bus size and subwordread, so no FP control reaches the walker's access. Add fpADUpdate32 (F instructions only) in a new coverage64f suite that f_rv64gc and fh_rv64gc run in regression. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: David Harris <David_Harris@hmc.edu>
Contributor
|
While this change is functionally correct, it is inconsistent with the style established with the existing control signals gated by SelHPTW. All other M stage control signals are brought into hptw.sv and muxed with the hptw's driver. For example... |
Move the FpLoadStoreM gating from the LSU into hptw.sv as fpmux, next to rwmux, sizemux and the other controls the walker overrides, as requested in review. LSUFpLoadStoreM is now an hptw output (and FpLoadStoreM itself when there is no walker). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: David Harris <David_Harris@hmc.edu>
…idth openhwfoundation#1948) into dh/fp-ad-update-pte openhwfoundation#1895 deleted testbench/tests.vh and the testbench's named test lists, so this branch's coverage64gc entry for fpADUpdate and its coverage64f list and testbench case for fpADUpdate32 go away: take main's testbench.sv and drop tests.vh. Every ELF in tests/coverage now runs on rv64gc, which picks up fpADUpdate and fpADUpdate32 without a list. The next commit hooks fpADUpdate32 into the regression for the F-only configurations. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: David Harris <David_Harris@hmc.edu>
The coverage64f suite named in derivconfigtests no longer exists now that tests.vh is gone. List fpADUpdate32 per configuration in deriv_coverage_tests instead and run it from tests/coverage as one ELF group per configuration in the nightly regression, the way periph_tests runs the peripheral tests. On rv64gc it runs with the rest of tests/coverage. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: David Harris <David_Harris@hmc.edu>
rosethompson
approved these changes
Oct 15, 2026
Keep main's coverage32 lockstep run and addActTests next to the fpADUpdate32 derivative-config runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: David Harris <David_Harris@hmc.edu>
rosethompson
approved these changes
Oct 15, 2026
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.
The FP store-data mux in the LSU sits after the walker's PTE write-data mux and was selected by
FpLoadStoreMalone, so with menvcfg.ADUE=1 an A/D-update walk started by an FP store or load (or by an instruction fetch while fclass, fmv.x.* or an FP load/store was in M) wrote the FP register into the PTE:fsdto a D=0 page left f1's bits in the PTE instead of the PTE with D set. The TLB was filled correctly, so the corrupt PTE took effect only after eviction or SFENCE.VMA, letting user data become a leaf PTE. The same happened on F-only configs with XLEN=64 (f_rv64gc, fh_rv64gc), where the FLEN < XLEN branch of the mux was used. hptw.sv now muxes FpLoadStoreM with the walker (fpmux, next torwmuxand the other M-stage controls it overrides), and the LSU uses the resultingLSUFpLoadStoreMfor both store-data mux branches, the bus size and subwordread, so no FP control reaches the walker's access. It adds the self-checking testsfpADUpdate(fsd/fld) andfpADUpdate32(fsw/flw) to tests/coverage, where they run on rv64gc with the rest of that directory; regression-wally's nightly regression also runsfpADUpdate32on f_rv64gc and fh_rv64gc. Part of #1921.🤖 Generated with Claude Code