Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hyperlight-dev/hyperlight
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: hyperlight-dev/hyperlight
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: hyperlight-unikraft
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 6 files changed
  • 1 contributor

Commits on Jun 24, 2026

  1. perf(whp): batch register resets, cache xsave, add whp-no-surrogate mode

    Batch vCPU register resets: combine GPR + debug + special registers
    into a single WHvSetVirtualProcessorRegisters call (3 calls → 1).
    
    Cache xsave template: build the zeroed xsave buffer once during
    WhpVm::new(), reuse on every reset (eliminates 2 WHvGet* reads
    per restore).
    
    Add whp-no-surrogate feature flag: when enabled, allocates sandbox
    memory with VirtualAlloc (not CreateFileMappingA), maps GPA ranges
    with WHvMapGpaRange (not WHvMapGpaRange2), and zeros scratch via
    VirtualFree(MEM_DECOMMIT) + VirtualAlloc(MEM_COMMIT) for near-instant
    lazy zeroing. Intended for single-partition-per-process scenarios
    where the WHvMapGpaRange multi-partition limitation does not apply.
    
    Signed-off-by: danbugs <danilochiarlone@gmail.com>
    danbugs committed Jun 24, 2026
    Configuration menu
    Copy the full SHA
    b9b148c View commit details
    Browse the repository at this point in the history
  2. perf: add restore_preserving_file_mappings for read-only regions

    Skip unmapping and remapping MemoryRegionType::MappedFile regions
    during snapshot restore. These are mapped PAGE_READONLY at the
    hypervisor level, so guest writes go through copy-on-write via
    scratch memory — the host-side mapping is unchanged across restores.
    
    Signed-off-by: danbugs <danilochiarlone@gmail.com>
    danbugs committed Jun 24, 2026
    Configuration menu
    Copy the full SHA
    06d04b7 View commit details
    Browse the repository at this point in the history
  3. fix: address review findings in whp-no-surrogate

    - zero(): panic instead of falling through to fill(0) if MEM_COMMIT
      fails after MEM_DECOMMIT — decommitted pages are unusable
    - WhpVm::new(): propagate xsave template errors instead of expect()
    - HostMapping Drop: gate INVALID_HANDLE_VALUE branch on the feature
      so it cannot be an empty no-op block
    
    Signed-off-by: danbugs <danilochiarlone@gmail.com>
    danbugs committed Jun 24, 2026
    Configuration menu
    Copy the full SHA
    4fcef00 View commit details
    Browse the repository at this point in the history
  4. fix: adapt restore_preserving_file_mappings to upstream Snapshot API

    Signed-off-by: danbugs <danilochiarlone@gmail.com>
    danbugs committed Jun 24, 2026
    Configuration menu
    Copy the full SHA
    d0c64a4 View commit details
    Browse the repository at this point in the history
  5. fix: add DirectAlloc arm to ReadonlySharedMemory::host_region_base

    Signed-off-by: danbugs <danilochiarlone@gmail.com>
    danbugs committed Jun 24, 2026
    Configuration menu
    Copy the full SHA
    cc22940 View commit details
    Browse the repository at this point in the history
Loading