Skip to content

Support code rewriting for AArch64 Linux guests - #1141

Merged
Sangho Lee (sangho2) merged 1 commit into
uliteboxfrom
sanghle/aarch64-linux/2-rewriter-aot
Aug 7, 2026
Merged

Support code rewriting for AArch64 Linux guests#1141
Sangho Lee (sangho2) merged 1 commit into
uliteboxfrom
sanghle/aarch64-linux/2-rewriter-aot

Conversation

@sangho2

@sangho2 Sangho Lee (sangho2) commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

This PR adds support for code rewriting for AArch64 Linux guests. It redirects all SVC instructions and TPIDR_EL0 accesses through compact gates/slots. The SVC gate is mostly guest-neutral, but the TPIDR_EL0 gates are Linux guest specific. A virtualized guest TPIDR_EL0 offsets relative to a host anchor register (i.e., TPIDR_EL0, X18, and TPIDRRO_EL0 in Linux, Windows, and macOS, respectively).

@sangho2
Sangho Lee (sangho2) force-pushed the sanghle/aarch64-linux/2-rewriter-aot branch 2 times, most recently from 1d342bb to b5b655b Compare August 7, 2026 01:51
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.
@sangho2
Sangho Lee (sangho2) force-pushed the sanghle/aarch64-linux/2-rewriter-aot branch from b5b655b to f2c7765 Compare August 7, 2026 13:29
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

🤖 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.

@sangho2
Sangho Lee (sangho2) marked this pull request as ready for review August 7, 2026 13:42
@sangho2
Sangho Lee (sangho2) added this pull request to the merge queue Aug 7, 2026
Merged via the queue into ulitebox with commit f8254d8 Aug 7, 2026
7 checks passed
@sangho2
Sangho Lee (sangho2) deleted the sanghle/aarch64-linux/2-rewriter-aot branch August 7, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant