[hyperlight_guest_bin] Add page fault and undefined instruction hooks - #1877
Open
syntactically wants to merge 1 commit into
Open
syntactically wants to merge 1 commit into
syntactically wants to merge 1 commit into
Conversation
syntactically
requested review from
andreiltd,
danbugs,
dblnz,
devigned,
jprendes,
jsturtevant,
ludfjig,
simongdavies and
squillace
as code owners
October 2, 2026 10:52
syntactically
added this pull request to stack #1875
October 2, 2026 10:52
This comment has been minimized.
This comment has been minimized.
syntactically
force-pushed
the
lm/exn-hooks-mini
branch
from
October 2, 2026 12:29
a8843e2 to
e50dc7c
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
AMD64 hooks fall through to abort handling and enter handlers with incorrect stack alignment.
Review effort: Balanced
Findings: 2
Open (7)
Fix AMD64 hook stack alignment · New Return after preparing redirected page-fault hook frame · New Document safety contract for undefined-instruction hook dispatch · New Document safety contract for page-fault hook dispatch · New Document public exception hooks in the changelog · New Add integration tests for public exception hooks · New Remove dead commented-out declaration · New
What changed in this PR
Adds architecture-independent page-fault and undefined-instruction hooks for guest binaries.
Changes:
- Adds public hook registration APIs.
- Redirects AMD64 and AArch64 exception contexts to registered handlers.
- Extends AArch64 syndrome decoding for instruction faults.
| File | Description |
|---|---|
src/hyperlight_guest_bin/src/lib.rs |
Exposes the cross-platform exception module. |
src/hyperlight_guest_bin/src/exception.rs |
Defines and registers exception hooks. |
src/hyperlight_guest_bin/src/arch/amd64/exception/handle.rs |
Adds AMD64 hook dispatch. |
src/hyperlight_guest_bin/src/arch/aarch64/exception/handle.rs |
Adds AArch64 hook dispatch. |
src/hyperlight_common/src/arch/aarch64/exn.rs |
Decodes unknown and instruction-abort syndromes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This comment has been minimized.
This comment has been minimized.
syntactically
force-pushed
the
lm/exn-hooks-mini
branch
from
October 2, 2026 15:49
e50dc7c to
724e477
Compare
This comment has been minimized.
This comment has been minimized.
ludfjig
previously approved these changes
Oct 2, 2026
jsturtevant
reviewed
Oct 2, 2026
syntactically
force-pushed
the
lm/exn-hooks-mini
branch
2 times, most recently
from
October 2, 2026 20:28
53f0463 to
8f998bc
Compare
Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>
syntactically
force-pushed
the
lm/exn-hooks-mini
branch
from
October 3, 2026 00:26
8f998bc to
08d8f5a
Compare
Benchmark ResultsMeasured commit: kvm / amd (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
kvm / intel (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
mshv3 / amd (Linux) (❌ 1.65x)Top regressions
Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
mshv3 / intel (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
hyperv-ws2025 / amd (Windows) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
hyperv-ws2025 / intel (Windows) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
Reported by |
This branch has not been deployed
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.


No description provided.