Repository navigation
Conversation
Decode::mappings publishes the pages one BAR decodes whole, so a host can map them straight to the function. It checked for overlap only between the BARs that cover at least one whole page, so a BAR smaller than a page lying inside a larger BAR's page left that page to the larger BAR: a run over it sent the processor's accesses to the larger BAR, while the host's own decode answered the same addresses from the smaller one. Every BAR in the window now counts as a claim on the bytes it decodes, and a page any other BAR claims gets no run, as overlapping whole-page BARs already did. Found while porting a per-head table to the Fuel's XBridge, whose tests compare the direct path with the host decode at every address. Test: a_sub_page_bar_inside_another_bars_page_keeps_the_page_off_the_runs (fails without the change; with the small BAR disabled the larger one gets its run back). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
pci: keep a page a sub-page bar shares off another bar's run
Decode::mappings publishes the pages one BAR decodes whole, so a host
can map them straight to the function. It checked for overlap only
between the BARs that cover at least one whole page, so a BAR smaller
than a page lying inside a larger BAR's page left that page to the
larger BAR: a run over it sent the processor's accesses to the larger
BAR, while the host's own decode answered the same addresses from the
smaller one. Every BAR in the window now counts as a claim on the bytes
it decodes, and a page any other BAR claims gets no run, as overlapping
whole-page BARs already did.
Found while porting a per-head table to the Fuel's XBridge, whose tests
compare the direct path with the host decode at every address.
Test: a_sub_page_bar_inside_another_bars_page_keeps_the_page_off_the_runs
(fails without the change; with the small BAR disabled the larger one
gets its run back).
Upstream's tests did not cover the case and no guest is known to hit it; the new test fails on main without the change.
Tested on macOS arm64 at the tip:
cargo test --workspace --no-fail-fastwith--features jitv2,rex-jit,gputraceand with default features, andcargo build --release -p iris --bins --features lightning,jitv2,gpujit,idle-pause,hostgl. No failures beyond those upstream main shows on the same host (port-forward restarts, wgpu with no adapter,chd_synced_writes_survive_an_exit_that_skips_drop,resident_plane_raw_pointer_faults_in_child_processes).kona::back::tiles::tests::a_tiled_run_is_bit_exact_with_the_inline_onewas skipped: on main it hangs there under load (the producer spins inTiles::submit/retirewhile every worker sleeps) and passes alone.🤖 Generated with Claude Code