Skip to content

1.8: vmbfs: Implement SaveRestore (#4072) - #4125

Open
Steven Malis (smalis-msft) wants to merge 1 commit into
microsoft:release/1.8.2607from
smalis-msft:backport-1.8-pr4072
Open

1.8: vmbfs: Implement SaveRestore (#4072)#4125
Steven Malis (smalis-msft) wants to merge 1 commit into
microsoft:release/1.8.2607from
smalis-msft:backport-1.8-pr4072

Conversation

@smalis-msft

Copy link
Copy Markdown
Contributor

Backport of #4072 to release/1.8.2607.

The cherry-pick of 59dd998 applied cleanly onto release/1.8.2607 with no conflicts and no manual edits.

Original PR: #4072


This backport PR was created by an AI agent (GitHub Copilot) on behalf of Steven Malis (@smalis-msft).

The hope is this will fix some UEFI flakiness, as our UEFI is not
tolerant of vmbfs getting revoked and reoffered, which is the fallback
behavior for vmbus devices that don't implement SaveRestore.

(cherry picked from commit 59dd998)
Copilot AI review requested due to automatic review settings July 31, 2026 17:18
@smalis-msft Steven Malis (smalis-msft) added the release_1.8.2607 Targets the release/1.8.2607 branch. label Jul 31, 2026
@smalis-msft
Steven Malis (smalis-msft) enabled auto-merge (squash) July 31, 2026 17:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Backport to release/1.8.2607 adding Save/Restore support to the vmbfs VMBus device so it can be restored without revoke/reoffer fallback behavior (intended to reduce UEFI flakiness).

Changes:

  • Implement SaveRestoreSimpleVmbusDevice for VmbfsDevice and advertise support via supports_save_restore().
  • Add a protobuf-encoded saved-state payload (mesh) to persist the channel state across save/restore.
  • Add the mesh dependency for vmbfs and update Cargo.lock accordingly.

Reviewed changes

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

File Description
vm/devices/vmbus/vmbfs/src/lib.rs Adds Save/Restore support and defines the saved-state protobuf payload.
vm/devices/vmbus/vmbfs/Cargo.toml Adds mesh dependency required for the saved-state encoding.
Cargo.lock Records the new mesh dependency for the vmbfs crate.

Comment on lines +355 to +367
fn save_open(&mut self, runner: &Self::Runner) -> state::SavedState {
let Self::Runner {
state,
pipe: _,
buf: _,
} = runner;
state::SavedState {
state: match state {
State::VersionRequest => state::State::VersionRequest,
State::Ready => state::State::Ready,
},
}
}
Comment on lines 52 to +54
#[async_trait]
impl SimpleVmbusDevice for VmbfsDevice {
type SavedState = SavedStateNotSupported;
type SavedState = save_restore::state::SavedState;
@github-actions

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_1.8.2607 Targets the release/1.8.2607 branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants