Repository navigation
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
The HVF trampoline and instruction-cache changes require Apple Silicon and Windows runtime validation because this review could inspect code and API contracts but could not exercise those platform-specific paths.
No open issues 🎉
What changed in this PR
This PR addresses HVF initialization faults caused by guest register values selecting Apple hypercalls. It also prepares host-written snapshot memory for guest execution by synchronizing instruction caches.
Changes:
- Uses a nonzero HVC identifier for the HVF TLB-flush trampoline and tests Apple hypercall register values.
- Synchronizes instruction caches on macOS and Windows when preparing snapshot memory.
- Documents both fixes in the changelog.
| File | Description |
|---|---|
src/hyperlight_host/src/mem/shared_mem.rs |
Adds instruction-cache synchronization to snapshot memory preparation. |
src/hyperlight_host/src/hypervisor/virtual_machine/hvf/mod.rs |
Updates the trampoline HVC identifier and adds a regression test. |
CHANGELOG.md |
Records the HVF initialization and instruction-cache fixes. |
Review effort: Balanced
This comment has been minimized.
This comment has been minimized.
jsturtevant
left a comment
There was a problem hiding this comment.
LGTM, @syntactically for another set of eyes on ARM
ec02e9b to
c2d292e
Compare
HVF handles some hvc #0 calls internally based on x0. Guest register values can select these calls, causing the tlb flush trampoline to continue past its hvc and fault. Signed-off-by: Tomasz Andrzejak <andreiltd@gmail.com>
c2d292e to
c2a773a
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) (➖ stable)No benchmark improved or regressed. 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 |
ludfjig
left a comment
There was a problem hiding this comment.
lgtm to me as well but i'm not too familiar with this
HVF handles some hvc #0 calls internally based on x0. Guest register values can select these calls, causing the tlb flush trampoline to continue past its hvc and fault.