Remove i686-guest, nanvix-unstable and guest-counter features#1525
Open
simongdavies wants to merge 4 commits into
Open
Remove i686-guest, nanvix-unstable and guest-counter features#1525simongdavies wants to merge 4 commits into
simongdavies wants to merge 4 commits into
Conversation
2bcbfc1 to
aba172e
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the experimental 32-bit i686 guest support and the related i686-guest, nanvix-unstable, and guest-counter Cargo features across the host/guest/common crates, simplifying multiple conditional code paths in the VMM and its ABI surface.
Changes:
- Removed i686-specific guest/host/common code paths (page table/snapshot behavior, special registers defaults) and the associated feature flags, CI checks, and Justfile targets.
- Simplified
map_file_cowby removing Nanvix PEB file-mapping metadata (labels, fixed-size metadata array, and related tests/helpers). - Introduced a precise
readable_shared_memcfg-alias to compilemem::layout::ReadableSharedMemoryonly when it’s actually used (gdb path or shared-snapshotmem_profilepath).
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/hyperlight_host/src/sandbox/uninitialized.rs | Removes GuestCounter API and Nanvix-related file mapping label/limit plumbing from the uninitialized sandbox path. |
| src/hyperlight_host/src/sandbox/uninitialized_evolve.rs | Removes publishing scratch HostSharedMemory for GuestCounter and removes Nanvix PEB file-mapping entry writes during evolve. |
| src/hyperlight_host/src/sandbox/snapshot/mod.rs | Drops i686-gated snapshot behaviors/tests and simplifies skip logic now that only 64-bit guests are supported. |
| src/hyperlight_host/src/sandbox/initialized_multi_use.rs | Updates map_file_cow API (removes label) and removes Nanvix PEB metadata logic and tests tied to it. |
| src/hyperlight_host/src/sandbox/file_mapping.rs | Removes file-mapping label construction/storage; PreparedFileMapping now tracks only mapping essentials. |
| src/hyperlight_host/src/mem/shared_mem.rs | Removes test-only helper used to create HostSharedMemory for GuestCounter. |
| src/hyperlight_host/src/mem/mgr.rs | Removes i686 crashdump path and adjusts crashdump gating (notably needs consistency with cfg-aliases). |
| src/hyperlight_host/src/mem/memory_region.rs | Removes i686-only crashdump address helper and cleans up i686-related cfg allowances. |
| src/hyperlight_host/src/mem/layout.rs | Removes Nanvix PEB file-mapping layout space and gates ReadableSharedMemory on a new readable_shared_mem cfg-alias. |
| src/hyperlight_host/src/mem/elf.rs | Simplifies ELF PT_LOAD handling by removing Nanvix 32-bit ELF gating. |
| src/hyperlight_host/src/lib.rs | Removes GuestCounter re-export. |
| src/hyperlight_host/src/hypervisor/virtual_machine/whp.rs | Removes i686-gated test helper gating. |
| src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs | Removes i686-gated test helper gating. |
| src/hyperlight_host/src/hypervisor/virtual_machine/mod.rs | Removes i686-gated XSAVE constants/method gating for tests. |
| src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs | Removes i686-gated test helper gating. |
| src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs | Removes i686 32-bit paging defaults and makes amd64 constants unconditional. |
| src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs | Removes i686 special-register setup branch and related test gating. |
| src/hyperlight_host/examples/map-file-cow-test/main.rs | Updates example to new map_file_cow signature (no label parameter). |
| src/hyperlight_host/examples/crashdump/main.rs | Updates example/tests to new map_file_cow signature (no label parameter). |
| src/hyperlight_host/Cargo.toml | Removes i686-guest, nanvix-unstable, and guest-counter feature definitions. |
| src/hyperlight_host/build.rs | Updates cfg-aliases: removes Nanvix from unshared_snapshot_mem and adds readable_shared_mem. |
| src/hyperlight_guest/src/prim_alloc.rs | Removes i686 arch module selection. |
| src/hyperlight_guest/src/layout.rs | Removes i686 arch module selection and removes guest counter address helper. |
| src/hyperlight_guest/src/exit.rs | Removes i686 arch module selection. |
| src/hyperlight_guest/src/arch/i686/prim_alloc.rs | Deletes i686 guest primitive allocator stub. |
| src/hyperlight_guest/src/arch/i686/layout.rs | Deletes i686 guest layout constants/stubs. |
| src/hyperlight_guest/Cargo.toml | Removes guest i686-guest/guest-counter features. |
| src/hyperlight_common/src/vmem.rs | Removes i686 arch selection and i686 feature compile-time checks. |
| src/hyperlight_common/src/mem.rs | Removes Nanvix PEB file-mappings metadata types/constants and the gated PEB field. |
| src/hyperlight_common/src/layout.rs | Removes i686 arch selection and guest-counter scratch offset constant; exports snapshot PT range constants unconditionally. |
| src/hyperlight_common/src/arch/i686/vmem.rs | Deletes i686 page table implementation. |
| src/hyperlight_common/src/arch/i686/layout.rs | Deletes i686 layout constants and helpers. |
| src/hyperlight_common/src/arch/amd64/vmem.rs | Removes TODO comment referencing i686 alignment work. |
| src/hyperlight_common/Cargo.toml | Removes i686-guest, nanvix-unstable, and guest-counter features. |
| Justfile | Removes i686 check recipe and removes i686 feature checks from just check. |
| flake.nix | Removes i686 target from the Nix toolchain target list. |
| CHANGELOG.md | Documents removal of i686/Nanvix/guest-counter features and 32-bit guest support. |
| .github/workflows/dep_code_checks.yml | Removes the 32-bit (i686) compatibility build check from CI. |
simongdavies
added a commit
to simongdavies/hyperlight
that referenced
this pull request
Jun 10, 2026
Four crashdump-only items in mem::mgr (the BasicMapping/MappingKind import, mapping_kind_to_flags, try_coalesce_region and get_guest_memory_regions) were gated on the raw `crashdump` feature rather than the `crashdump` cfg-alias from build.rs (all(feature = "crashdump", target_arch = "x86_64")). They reference CrashDumpRegion/MemoryRegionFlags/MemoryRegionType, which are imported under #[cfg(crashdump)], so enabling the feature on a non-x86_64 target would compile the code without the types and fail to build. Switch them to #[cfg(crashdump)] for consistency with the rest of the crashdump codepath. Addresses Copilot review feedback on hyperlight-dev#1525. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
ludfjig
requested changes
Jun 10, 2026
Contributor
There was a problem hiding this comment.
LGTM.
- Can we remove SpaceAwareMapping::AnotherSpace, space_aware_map, SpaceReferenceMapping, SpaceId, built_roots, PtRootFinder/set_pt_root_finder, root_pt_gpas: &[u64], since they are not used anymore. I think we only need single-root walker and not multi-root walkers. They were introduced in #1385
- Add breaking change to map_file_cow signature to the changelog
If you prefer the top bullet can be separate pr
Removes the experimental 32-bit i686 guest support along with the nanvix-unstable and guest-counter cargo features that depended on or accompanied it. This deletes the i686 arch modules, the PEB file-mapping plumbing (labels, preallocated FileMappingInfo array), the GuestCounter API, and the associated cfg gating, tests, Justfile recipes, CI matrix entries and docs. As part of the cleanup, the ReadableSharedMemory trait machinery in mem::layout is now gated on a precise 'readable_shared_mem' cfg alias (gdb debug path or shared-snapshot mem_profile path) instead of a blanket Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com> #[allow(unused)], so it is compiled out entirely when unused.
Four crashdump-only items in mem::mgr (the BasicMapping/MappingKind import, mapping_kind_to_flags, try_coalesce_region and get_guest_memory_regions) were gated on the raw `crashdump` feature rather than the `crashdump` cfg-alias from build.rs (all(feature = "crashdump", target_arch = "x86_64")). They reference CrashDumpRegion/MemoryRegionFlags/MemoryRegionType, which are imported under #[cfg(crashdump)], so enabling the feature on a non-x86_64 target would compile the code without the types and fail to build. Switch them to #[cfg(crashdump)] for consistency with the rest of the crashdump codepath. Addresses Copilot review feedback on hyperlight-dev#1525. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Drop unused multi-root page-table snapshot machinery introduced by the old aliasing work: - Remove PtRootFinder/set_pt_root_finder and root_pt_gpas plumbing from MultiUseSandbox and SandboxMemoryManager snapshot flow. - Simplify Snapshot::new to walk and rebuild from a single root (CR3) using virt_to_phys + map only. - Remove unused multi-space API/types from hyperlight_common::vmem: SpaceId, SpaceReferenceMapping, SpaceAwareMapping, walk_va_spaces, and space_aware_map, plus arch stubs. This keeps only the single-root walker path now used by the host and eliminates dead code and extra complexity. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
6804f78 to
49de717
Compare
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.
Removes the experimental 32-bit i686 guest support along with the nanvix-unstable and guest-counter cargo features that depended on or accompanied it. This deletes the i686 arch modules, the PEB file-mapping plumbing (labels, preallocated FileMappingInfo array), the GuestCounter API, and the associated cfg gating, tests, Justfile recipes, CI matrix entries and docs.
As part of the cleanup, the ReadableSharedMemory trait machinery in mem::layout is now gated on a precise 'readable_shared_mem' cfg alias (gdb debug path or shared-snapshot mem_profile path) instead of a blanket
#[allow(unused)], so it is compiled out entirely when unused.