Conversation
There was a problem hiding this comment.
Pull request overview
Adds a Windows Hypervisor Platform (WHP) backend for Windows/aarch64 so Hyperlight can run micro-VMs on ARM64 Windows systems, aligning WHP’s structure with existing per-arch hypervisor layouts.
Changes:
- Introduces
whp/aarch64.rsimplementing theVirtualMachinetrait for ARM64 WHP, including MMIO-based exit handling and register get/set viaWHvGet/SetVirtualProcessorRegisters. - Restructures the WHP backend into
whp/with per-architecture modules and fixes x86_64 interrupt helper module paths. - Wires WHP into the aarch64 Hyperlight VM path on Windows and moves
vmm-sys-utilinto unix-only dependencies to fix Windows builds.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/hyperlight_host/src/sandbox/snapshot/file/config.rs | Adds Windows/aarch64 CPU vendor token for snapshot config. |
| src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs | Updates hw_interrupts module paths after WHP directory restructure. |
| src/hyperlight_host/src/hypervisor/virtual_machine/whp/mod.rs | New per-arch WHP module dispatcher (x86_64 vs aarch64). |
| src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs | New ARM64 WHP backend implementation and manual ARM64 WHP FFI bindings. |
| src/hyperlight_host/src/hypervisor/hyperlight_vm/aarch64.rs | Selects WHP on Windows/aarch64 and adds Windows interrupt handle wiring. |
| src/hyperlight_host/Cargo.toml | Makes vmm-sys-util unix-only to avoid Windows compilation failures. |
5f992dc to
1d3a299
Compare
|
End-to-end Using this PR's 0.16 crates, a freshly scaffolded sample successfully built The backend works. The published scaffold is the remaining user-experience gap: |
syntactically
left a comment
There was a problem hiding this comment.
This looks great! I have a bunch of little nits, and also I (more majorly) think that the addition of reset_vcpu to InteruptHandle seems wrong.
7e93813 to
4c2f4e4
Compare
404a655 to
189317a
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
Signed-off-by: cshung <3410332+cshung@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6f20a05d-6bee-4e2e-b320-12f8d9759bbc Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
Use WHvResetPartition so snapshots preserve partition mappings while resetting virtual processor state. Keep reset ownership in the virtual machine abstraction. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
Wait for process-wide partition capacity before allocating GIC-backed ARM64 partitions. Release capacity only after WHP teardown completes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
9f9058d to
b6ecb9d
Compare
Match WHV_RUN_VP_EXIT_CONTEXT's 16-byte ABI alignment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6f20a05d-6bee-4e2e-b320-12f8d9759bbc Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
Fall back to generic MMIO for undecodable ARM64 writes and share file-mapping cleanup across WHP backends. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6f20a05d-6bee-4e2e-b320-12f8d9759bbc Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
14 similar comments
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.
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.
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.
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.83x)Top regressions
Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
mshv3 / intel (Linux) (❌ 1.57x)Top regressions
Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
hyperv-ws2025 / amd (Windows) (❌ 1.76x)Top regressions
Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
hyperv-ws2025 / intel (Windows) (❌ 1.51x)Top regressions
Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
Reported by |
Summary
Implements the WHP (Windows Hypervisor Platform) hypervisor backend for aarch64, enabling hyperlight to run micro-VMs on Windows ARM64 systems.
Resolves #1544
Changes
Structural
whp.rsintowhp/directory (mod.rs+x86_64.rs) to support per-architecture implementations, matching the existingkvm/andmshv/patternsuper::x86_64::hw_interruptsmodule path after directory restructureNew:
whp/aarch64.rsWinHvPlatformDefs.h)VirtualMachinetrait implementation with:WHvGet/SetVirtualProcessorRegistersIntegration
WhpVmintohyperlight_vm/aarch64.rsfor Windows platformWindowsInterruptHandlefor aarch64 WindowsCpuVendor::current()for aarch64 Windows targetCross-compilation fix
vmm-sys-utilto unix-only dependencies (it doesn't compile on Windows)Verification
Verified compilation on three targets:
just clippy debug/releasepasscargo checkpassescargo check --features kvmpassesWhy manual FFI bindings?
The
windowscrate (v0.62) does not expose ARM64 WHP types (register names, exit reasons, exit context structs). All definitions were extracted from the Windows SDK headerWinHvPlatformDefs.h(SDK 10.0.26100.0) which has full ARM64 support behind#ifdef _ARM64_.