ovmm: Break dependency from hypervisors to core#3531
Open
smalis-msft wants to merge 3 commits into
Open
Conversation
jstarks
approved these changes
May 20, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR aims to break the dependency chain from openvmm_hypervisors to openvmm_core by relocating hypervisor backend resource resolvers into openvmm_resources and moving the probe-registration macro into hypervisor_resources.
Changes:
- Moved hypervisor handle → backend resolver implementations out of
openvmm_hypervisorsintoopenvmm_resources::hypervisor_resolvers. - Moved
register_hypervisor_probes!macro fromopenvmm_coretohypervisor_resourcesand updated call sites. - Adjusted Cargo features/dependencies so
openvmm_hypervisorsno longer depends onopenvmm_core, andopenvmm_resourcesdepends directly onvirt_*crates andhypervisor_resources.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| openvmm/openvmm_resources/src/lib.rs | Registers hypervisor resolvers via new local hypervisor_resolvers module. |
| openvmm/openvmm_resources/src/hypervisor_resolvers.rs | New module root for per-backend resolver submodules. |
| openvmm/openvmm_resources/src/hypervisor_resolvers/{mshv,kvm,whp,hvf}.rs | New resolver implementations moved from openvmm_hypervisors. |
| openvmm/openvmm_resources/Cargo.toml | Replaces openvmm_hypervisors dependency with direct hypervisor_resources + virt_* optional deps. |
| openvmm/openvmm_hypervisors/src/{kvm,mshv,whp,hvf}.rs | Removes resolver implementations (leaving probes only). |
| openvmm/openvmm_hypervisors/src/lib.rs | Switches probe registration macro to hypervisor_resources::register_hypervisor_probes!. |
| openvmm/openvmm_hypervisors/Cargo.toml | Drops openvmm_core dependency; adjusts feature definitions. |
| openvmm/openvmm_core/src/hypervisor_backend.rs | Removes the register_hypervisor_probes! macro export. |
| openvmm/hypervisor_resources/src/lib.rs | Adds register_hypervisor_probes! macro export and updates docs accordingly. |
jstarks
approved these changes
May 20, 2026
jstarks
approved these changes
May 20, 2026
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.
This breaks one more dependency link of petri to openvmm_core, which is a chain it really shouldn't have.
Alternative to #3521, which would've had bad implications for future sandboxing work.