Conversation
Clearing Memory Space Enable on an assigned device triggers a physical MSE clear which in turn triggers an expensive BAR map/unmap on the L1R. OpenVMM only needs to change the guest-visible state while probing and reprogramming BARs. Return the shadowed MSE bit on Command-register reads. Guest BAR mappings continue to follow virtual MSE transitions, while reset, PCI power-state, and ownership transfer paths retain their existing behavior.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Core MSE virtualization behavior lacks regression tests for byte-enabled command accesses and mapping transitions.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Virtualizes PCI Memory Space Enable for VFIO-assigned devices, avoiding costly physical BAR remapping during guest probing.
Changes:
- Shadows MSE on command-register reads.
- Keeps physical MSE enabled while tracking guest MSE transitions for BAR mappings.
File summaries
| File | Description |
|---|---|
vm/devices/pci/vfio_assigned_device/src/lib.rs |
Implements virtual MSE handling and mapping updates. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1542
to
+1544
| let physical_value = | ||
| ByteEnabledDwordWrite::new(value.extract() | mse_mask, value.byte_enable()); | ||
| self.write_phys_config(offset, physical_value); |
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.
Clearing Memory Space Enable on an assigned device triggers a physical MSE clear which in turn triggers an expensive BAR map/unmap on the L1R. OpenVMM only needs to change the guest-visible state while probing and reprogramming BARs.
Return the shadowed MSE bit on Command-register reads. Guest BAR mappings continue to follow virtual MSE transitions, while reset, PCI power-state, and ownership transfer paths retain their existing behavior.