Repository navigation
LATX, opt: Check guest permissions before mixed host-page fallback - #520
Merged
LaurenIsACoder merged 1 commit intoOct 21, 2026
Conversation
For i386 on 16K hosts, first prove that the current access has the required cached guest permission at both endpoints. Successful accesses can then bypass the mixed host-page lookup. Keep each endpoint's permission for the fallback. A denied permission still faults in software only on a mixed host page; unmixed pages retain the hardware permission check. Preserve the first inaccessible address and the LATX_MT=2 path. Signed-off-by: Hanlu Li <[email protected]>
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.
For i386 guests on 16KB hosts, the enabled page-permission check consults host-page mixing before proving that a guest access is allowed. Check cached guest permissions at both access endpoints first, allowing successful accesses to bypass the mixed-page lookup.
The fallback retains separate endpoint permissions, software faults for mixed host pages, hardware checks for unmixed pages, and the first inaccessible fault address.
LATX_MT=2retains its existing check behavior. The change adds no permission cache, application-specific condition, or assumption that repeated executions of an instruction use the same address.Validation on a LoongArch 16KB-page host, against master
2cb2276faafd736a862560fee22e54d1d9e7d262:meson test -C build32 --suite lat-pr-fast --print-errorlogs --num-processes 1: 38/38 passed, no skips.LATX_AOT=0 LATX_MT=1: median paired loop-time reductions of 27.3% for ordinary valid accesses and 38.5% for valid accesses in mixed host pages. These are synthetic results, not application speedup claims.This remains a performance candidate: representative application benefit has not been established.