1.8: vmbfs: Implement SaveRestore (#4072) - #4125
Open
Steven Malis (smalis-msft) wants to merge 1 commit into
Open
1.8: vmbfs: Implement SaveRestore (#4072)#4125Steven Malis (smalis-msft) wants to merge 1 commit into
Steven Malis (smalis-msft) wants to merge 1 commit into
Conversation
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)
Steven Malis (smalis-msft)
enabled auto-merge (squash)
July 31, 2026 17:20
Contributor
There was a problem hiding this comment.
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
SaveRestoreSimpleVmbusDeviceforVmbfsDeviceand advertise support viasupports_save_restore(). - Add a protobuf-encoded saved-state payload (mesh) to persist the channel state across save/restore.
- Add the
meshdependency forvmbfsand updateCargo.lockaccordingly.
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; |
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.
Backport of #4072 to
release/1.8.2607.The cherry-pick of 59dd998 applied cleanly onto
release/1.8.2607with 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).