Skip to content

refactor: replace init-paging feature with nanvix-unstable#1291

Merged
danbugs merged 1 commit intohyperlight-dev:mainfrom
nanvix:nanvix/rename-init-paging
Mar 9, 2026
Merged

refactor: replace init-paging feature with nanvix-unstable#1291
danbugs merged 1 commit intohyperlight-dev:mainfrom
nanvix:nanvix/rename-init-paging

Conversation

@danbugs
Copy link
Contributor

@danbugs danbugs commented Mar 9, 2026

No description provided.

@danbugs danbugs added the kind/refactor For PRs that restructure or remove code without adding new functionality. label Mar 9, 2026
Make init-paging behavior (CoW guest paging) always-on by removing
it from the feature definitions and all cfg gates. Add a new
nanvix-unstable feature that opts out of CoW paging for guests
that manage their own page tables (e.g., Nanvix).

This inverts the polarity: previously you opted IN to init-paging,
now you opt IN to nanvix-unstable to disable it.

Signed-off-by: danbugs <danilochiarlone@gmail.com>
@danbugs danbugs force-pushed the nanvix/rename-init-paging branch from f83fc86 to d57c85e Compare March 9, 2026 18:14
@danbugs danbugs enabled auto-merge (squash) March 9, 2026 18:36
@ludfjig ludfjig requested a review from Copilot March 9, 2026 18:49
Copy link
Contributor

@ludfjig ludfjig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm alright!

@danbugs danbugs merged commit 564aacb into hyperlight-dev:main Mar 9, 2026
59 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors Hyperlight’s feature-gating around paging by removing the init-paging feature and introducing nanvix-unstable as the switch for the “no paging / identity mapped” configuration in the host (and renaming the corresponding workspace feature in hyperlight-common).

Changes:

  • Replace init-paging cfgs throughout the host with not(feature = "nanvix-unstable") (paging as the default behavior).
  • Update crashdump, VM special-register defaults, snapshot page-table setup, and related tests to follow the new feature gating.
  • Remove init-paging from Cargo feature sets and simplify Justfile test invocations accordingly.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/hyperlight_host/src/sandbox/snapshot.rs Updates snapshot creation to build page tables by default and skip under nanvix-unstable.
src/hyperlight_host/src/mem/mgr.rs Switches crashdump page-table walking vs identity-mapped region discovery based on nanvix-unstable.
src/hyperlight_host/src/mem/memory_region.rs Updates warning-suppression cfg attrs to match the new feature.
src/hyperlight_host/src/mem/layout.rs Makes BASE_ADDRESS and some warning-suppression attributes depend on nanvix-unstable.
src/hyperlight_host/src/mem/elf.rs Switches PT_LOAD import selection under nanvix-unstable vs default.
src/hyperlight_host/src/hypervisor/virtual_machine/whp.rs Updates test-only cfg gating for XSAVE helpers.
src/hyperlight_host/src/hypervisor/virtual_machine/mshv.rs Updates test-only cfg gating for XSAVE helpers/imports.
src/hyperlight_host/src/hypervisor/virtual_machine/mod.rs Updates XSAVE buffer/test-only API gating for the new feature.
src/hyperlight_host/src/hypervisor/virtual_machine/kvm.rs Updates test-only cfg gating for XSAVE helpers/imports.
src/hyperlight_host/src/hypervisor/regs/special_regs.rs Switches between 64-bit paging defaults vs real-mode defaults using nanvix-unstable.
src/hyperlight_host/src/hypervisor/hyperlight_vm.rs Updates sregs initialization, CR3/root page table behavior, and restore logic gating.
src/hyperlight_host/Cargo.toml Removes init-paging default/dependency feature, adds nanvix-unstable.
src/hyperlight_guest_bin/Cargo.toml Removes init-paging from hyperlight-common dependency features.
src/hyperlight_common/Cargo.toml Renames the feature entry to nanvix-unstable.
Justfile Removes init-paging from feature lists in test commands and updates comments accordingly.

@danbugs danbugs deleted the nanvix/rename-init-paging branch March 9, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactor For PRs that restructure or remove code without adding new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants