Repository navigation
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Guest entry ABI and persisted snapshot layout changes across x86_64 and aarch64 require validation of rebuilt guests and initialization, restore, fork, and OCI round trips on supported hypervisors before approval.
No open issues 🎉
What changed in this PR
This PR routes guest startup data through existing virtqueue buffers and removes the PEB-backed initialization region. This is a breaking change requiring rebuilt guests and regenerated snapshots.
Changes:
- Remove initialization-data APIs and simplify host and guest startup arguments.
- Update snapshots to ABI 10 and config schema v6, with legacy formats rejected.
- Add retained-buffer snapshot tests and document startup-data migration.
| File | Description |
|---|---|
src/tests/rust_guests/simpleguest/src/main.rs |
Remove the legacy user-memory test function. |
src/tests/rust_guests/simpleguest/src/bin/simpleguest-initial-data.rs |
Add a guest that retains startup buffers. |
src/tests/rust_guests/dummyguest/src/main.rs |
Validate the simplified entry arguments. |
src/hyperlight_host/tests/snapshot_goldens/goldens_version.rs |
Set snapshot goldens to v10.0. |
src/hyperlight_host/tests/integration_test.rs |
Remove assertions for deleted region variants. |
src/hyperlight_host/src/sandbox/uninitialized.rs |
Remove blob wrappers and accept GuestBinary directly. |
src/hyperlight_host/src/sandbox/uninitialized_evolve.rs |
Initialize guests without a PEB address. |
src/hyperlight_host/src/sandbox/snapshot/tripwires.rs |
Pin the updated snapshot contract. |
src/hyperlight_host/src/sandbox/snapshot/mod.rs |
Build snapshots without PEB or init-data regions. |
src/hyperlight_host/src/sandbox/snapshot/file/mod.rs |
Load schema v6 and reject older schemas. |
src/hyperlight_host/src/sandbox/snapshot/file/media_types.rs |
Define config v6 and ABI 10. |
src/hyperlight_host/src/sandbox/snapshot/file/config.rs |
Remove init-data fields from serialized configuration. |
src/hyperlight_host/src/sandbox/snapshot/file_tests.rs |
Test retained startup buffers and format compatibility. |
src/hyperlight_host/src/sandbox/initialized.rs |
Update initialization and snapshot tests. |
src/hyperlight_host/src/sandbox/builder.rs |
Remove the initialization-data builder option. |
src/hyperlight_host/src/mem/virtq/tests.rs |
Update the memory-layout fixture. |
src/hyperlight_host/src/mem/mgr.rs |
Update snapshot and layout test constructors. |
src/hyperlight_host/src/mem/memory_region.rs |
Remove PEB and init-data region definitions. |
src/hyperlight_host/src/mem/layout.rs |
Simplify initial memory to guest code and update layout tests. |
src/hyperlight_host/src/mem/exe.rs |
Update tests for Snapshot::from_binary. |
src/hyperlight_host/src/hypervisor/mod.rs |
Update the guest initialization test. |
src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs |
Adjust x86-64 startup registers. |
src/hyperlight_host/src/hypervisor/hyperlight_vm/aarch64.rs |
Adjust AArch64 startup registers. |
src/hyperlight_guest/src/lib.rs |
Remove the guest-handle module export. |
src/hyperlight_guest/src/guest_handle/handle.rs |
Delete the PEB-backed guest handle. |
src/hyperlight_guest_bin/src/lib.rs |
Remove PEB initialization and simplify random seeding. |
src/hyperlight_guest_bin/src/host_comm.rs |
Remove the legacy user-memory reader. |
src/hyperlight_guest_bin/src/arch/amd64/init.rs |
Update entry arguments and stack-pivot register. |
src/hyperlight_guest_bin/src/arch/aarch64/mod.rs |
Update entry arguments and stack-pivot register. |
src/hyperlight_common/src/mem.rs |
Delete shared PEB structures. |
src/hyperlight_common/src/lib.rs |
Remove the deleted memory module export. |
docs/snapshot-versioning.md |
Document ABI 10 and config v6 compatibility. |
docs/snapshot-oci-format.md |
Reference config schema v6. |
docs/how-to-build-a-hyperlight-guest-binary.md |
Explain startup-buffer retention and pool sizing. |
CHANGELOG.md |
Record breaking APIs and migration requirements. |
Review effort: Balanced
11f0a16 to
e9a13c4
Compare
This comment has been minimized.
This comment has been minimized.
ludfjig
left a comment
There was a problem hiding this comment.
LGTM, with 1 nit: build-rust-guests-non-pie runs cargo build without --bin, so it also builds this binary. Only simpleguest is copied to non_pie. Adding --bin simpleguest to that recipe avoids an extra build in each guest CI job.
Remove the peb backed init-data region and APIs. Use retained virtqueue ByteChunks for startup data. After removing the init section PEB no longer contains any data so it can be removed as well. Signed-off-by: Tomasz Andrzejak <andreiltd@gmail.com>
e9a13c4 to
05b0780
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
0244efc to
e29c4ba
Compare
This comment has been minimized.
This comment has been minimized.
e29c4ba to
f90efe7
Compare
syntactically
left a comment
There was a problem hiding this comment.
Very glad to see this finally gone!
| macro still happen automatically. Your `hyperlight_main` only needs to do | ||
| whatever extra setup the macros do not cover. | ||
|
|
||
| ### Startup data |
There was a problem hiding this comment.
I think this section is not very clear right now: it reads to me like it is mentioning 3 different approaches to init data (call host function in hyperlight_main returning vec, call guest function returning vec , call guest function with vec)) but doesn't really contrast them.
This comment has been minimized.
This comment has been minimized.
|
Hey @syntactically, I moved the instruction cache fixes here: #2039 |
f90efe7 to
9b9389c
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 |
Signed-off-by: Tomasz Andrzejak <andreiltd@gmail.com>
|
Just to be clear, #2039 needs to land first. For some reason the changes in this PR triggered that bug. |
Remove the peb backed init-data region and APIs. Use retained virtqueue ByteChunks for startup data. After removing the init section PEB no longer contains any data so it can be removed as well.