Support code rewriting for AArch64 Linux guests - #1141
Merged
Sangho Lee (sangho2) merged 1 commit intoAug 7, 2026
Conversation
Sangho Lee (sangho2)
force-pushed
the
sanghle/aarch64-linux/2-rewriter-aot
branch
2 times, most recently
from
August 7, 2026 01:51
1d342bb to
b5b655b
Compare
Redirects every `SVC` and `TPIDR_EL0` access through compact self-describing slots (64 bytes for `SVC`, 48 for `MSR`, 16 for `MRS`) carrying typed metadata in their final word, so a signal handler can recognize one by template alone. `SVC` gating is guest-neutral, but `TPIDR_EL0` is the Linux guest ABI's thread pointer, so this covers ELF guests only. Per-site outbound stubs preserve `x16` on syscall return, and guest thread-pointer offsets are patched in only after strict slot validation. x86-64 rewriting is unchanged. Adds the crate to the AArch64 CI job.
Sangho Lee (sangho2)
force-pushed
the
sanghle/aarch64-linux/2-rewriter-aot
branch
from
August 7, 2026 13:29
b5b655b to
f2c7765
Compare
|
🤖 SemverChecks 🤖 No breaking API changes detected Note: this does not mean API is unchanged, or even that there are no breaking changes; simply, none of the detections triggered. |
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.
This PR adds support for code rewriting for AArch64 Linux guests. It redirects all
SVCinstructions andTPIDR_EL0accesses through compact gates/slots. TheSVCgate is mostly guest-neutral, but theTPIDR_EL0gates are Linux guest specific. A virtualized guestTPIDR_EL0offsets relative to a host anchor register (i.e.,TPIDR_EL0,X18, andTPIDRRO_EL0in Linux, Windows, and macOS, respectively).