refactor: replace init-paging feature with nanvix-unstable#1291
Merged
danbugs merged 1 commit intohyperlight-dev:mainfrom Mar 9, 2026
Merged
refactor: replace init-paging feature with nanvix-unstable#1291danbugs merged 1 commit intohyperlight-dev:mainfrom
danbugs merged 1 commit intohyperlight-dev:mainfrom
Conversation
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>
f83fc86 to
d57c85e
Compare
Contributor
There was a problem hiding this comment.
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-pagingcfgs throughout the host withnot(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-pagingfrom Cargo feature sets and simplifyJustfiletest 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. |
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.
No description provided.