Repository navigation
Add slot-owned MSHV servicing - #934
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 Changes recommended
Capacity preflight can delete inactive files without reserving enough space for the retained fallback and commit-time overlap, while stale publication files can block retries or cause copies to run out of space.
2 open issues
What changed in this PR
Adds experimental slot-owned MSHV boot payload servicing for ACL UKI images, integrating deployment and recovery with Trident’s existing A/B lifecycle. Hypervisor identity validation remains an explicit success stub; boot and Secure Boot validation are not claimed.
Changes:
- Deploys complete nested payload bundles per slot, with fallback copying and ESP capacity checks.
- Adds configuration guards and a distinct hypervisor-failure recovery state.
- Extends unit coverage, status serialization, and feature documentation.
| File | Description |
|---|---|
proto/trident/v1preview/status_service.proto |
Exposes the hypervisor-failure state. |
docs/Explanation/Bootloader-Configuration.md |
Documents experimental support and limitations. |
crates/trident/src/subsystems/esp/mshv/slot.rs |
Implements bundle validation, copying, capacity checks, and tests. |
crates/trident/src/subsystems/esp/mshv.rs |
Registers the slot payload module. |
crates/trident/src/subsystems/esp.rs |
Integrates slot deployment and nested fallback copying. |
crates/trident/src/server/tridentserver/datastore.rs |
Maps and tests the new protocol state. |
crates/trident/src/lib.rs |
Handles recovery outcomes and preserves failure details. |
crates/trident/src/init/offline/mod.rs |
Rejects unsupported offline adoption. |
crates/trident/src/engine/update.rs |
Validates MSHV mode transitions before updates. |
crates/trident/src/engine/rollback.rs |
Adds hypervisor validation hooks and recovery handling. |
crates/trident/src/engine/mshv.rs |
Defines configuration guards and the identity-check stub. |
crates/trident/src/engine/mod.rs |
Registers the MSHV engine module. |
crates/trident/src/engine/manual_rollback/utils.rs |
Recognizes hypervisor auto-rollback history. |
crates/trident/src/engine/manual_rollback/mod.rs |
Guards rollback mode transitions. |
crates/trident/src/engine/boot/uki.rs |
Separates UKI cleanup planning from deletion. |
crates/trident_api/src/status.rs |
Adds the persisted recovery state. |
crates/trident_api/src/error.rs |
Adds a structured hypervisor mismatch error. |
crates/trident_api/src/constants.rs |
Defines the experimental feature flag. |
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Boot-critical EFI payload and rollback changes need human integration review because VM boot, firmware recovery, COSI, and Secure Boot lack validation, while hypervisor identity checking remains a success stub.
No open issues 🎉
3 resolved since last review
Review effort: Balanced
19835a1 to
1bb710f
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The test unconditionally expects success even though configuration validation rejects non-x86-64 targets, causing it to fail on ARM64 unless the expectation is architecture-dependent or gated to x86-64.
1 open issue
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Boot-critical firmware deployment and recovery require human review because validation with a produced COSI, VM boot, and Secure Boot is missing, while the hypervisor identity hook deliberately assumes success.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Boot-critical EFI/MSHV payload and recovery changes require human review because VM boot and Secure Boot behavior remain unvalidated, and runtime hypervisor identity verification is still a success stub.
No open issues 🎉
Review effort: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9785dfd5-6919-4af4-a4ec-1c9a74f3918a
There was a problem hiding this comment.
🔵 Needs a closer look
Boot-critical ESP relocation and A/B recovery require human runtime validation with the matching efitreeloader, since VM boot, rollback, and ENOSPC tests were not run on this head and hypervisor identity validation still assumes success.
No open issues 🎉
Review effort: Balanced
Validate layout transitions before staging and inline single-use helpers. Remove the placeholder hypervisor check and unused failure-state plumbing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88854ec6-204f-40de-bbfe-03a7ab8052b0
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88854ec6-204f-40de-bbfe-03a7ab8052b0
There was a problem hiding this comment.
🔵 Needs a closer look
Boot-critical MSHV relocation depends on a matching efitreeloader resolver, and the lack of VM boot, rollback, and ENOSPC testing leaves firmware compatibility and recovery behavior requiring human runtime validation.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88854ec6-204f-40de-bbfe-03a7ab8052b0
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88854ec6-204f-40de-bbfe-03a7ab8052b0
There was a problem hiding this comment.
🔵 Needs a closer look
Boot-critical MSHV relocation depends on a matching external path resolver, while current-head boot, update, rollback, and ENOSPC paths remain untested and require human end-to-end validation.
No open issues 🎉
Review effort: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88854ec6-204f-40de-bbfe-03a7ab8052b0
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88854ec6-204f-40de-bbfe-03a7ab8052b0
There was a problem hiding this comment.
🔵 Needs a closer look
Boot-critical slot/fallback publication depends on a matching external efitreeloader resolver, with current-head VM boot, rollback, and ENOSPC behavior still requiring human validation.
No open issues 🎉
Review effort: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88854ec6-204f-40de-bbfe-03a7ab8052b0
There was a problem hiding this comment.
🔵 Needs a closer look
Boot-critical relocation depends on an external efitreeloader resolver unavailable for inspection, leaving slot-specific hypervisor fallback, rollback, and interrupted VFAT publication recovery requiring human verification.
No open issues 🎉
Review effort: Balanced
Paco Huelsz (frhuelsz)
left a comment
There was a problem hiding this comment.
Three observations about copy_recursively, posted at the author's request.
Clarify unchecked copy preconditions and add path-aware errors. Move ACL detection into osrelease, name the MSHV test fixture, and remove leftover error-preservation churn. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 51df658f-200d-426f-aa83-68c76a76e4a3
There was a problem hiding this comment.
🔵 Needs a closer look
Boot-critical MSHV changes depend on matching external efitreeloader binaries, and reported update checks leave interrupted-publication, rollback, and UEFI fallback safety unverified, requiring human integration validation.
No open issues 🎉
Review effort: Balanced
Limit tree replacement helpers to ESP, construct validation errors at their failure sites, and reuse os-release read context. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 51df658f-200d-426f-aa83-68c76a76e4a3
There was a problem hiding this comment.
🔵 Needs a closer look
Boot-critical changes depend on matching external efitreeloader and signed MSHV artifacts, while reported manual-update tests leave fallback, rollback, and recovery boot behavior requiring human confirmation.
No open issues 🎉
Review effort: Balanced


Description
Implements #924: keep MSHV boot components and supporting bootloaders with their OS slot so an A/B update does not replace the retained OS's hypervisor files.
second.efithroughuses_efitreeloader(), require MSHV loaders throughuses_mshv(), and handle UKIs independently. Preserve additional MSHV files and their nested paths. Without MSHV metadata, unrelated MSHV files are ignored..new/.oldreplacement to directories, preserve retry recovery, and retire destination-only entries inside the owned boot tree without touching other slots.walkdirfor traversal and copying, rejecting source links and special files. Keep reusable filesystem mechanics inosutils::filesand boot-specific validation/publication/recovery in ESP.Rationale
The retained slot must keep a matching OS, bootloader chain and MSHV boot components. Capability-specific source validation and format-independent installed-tree copying keep those responsibilities separate without an exhaustive relocation filename list.
Limitations
Validation
trident updatewith COSI artifact.