Skip to content

ovmm: Break dependency from hypervisors to core#3531

Open
smalis-msft wants to merge 3 commits into
microsoft:mainfrom
smalis-msft:hyp-no-core
Open

ovmm: Break dependency from hypervisors to core#3531
smalis-msft wants to merge 3 commits into
microsoft:mainfrom
smalis-msft:hyp-no-core

Conversation

@smalis-msft
Copy link
Copy Markdown
Contributor

@smalis-msft smalis-msft commented May 20, 2026

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.

@smalis-msft smalis-msft requested a review from a team as a code owner May 20, 2026 16:13
Copilot AI review requested due to automatic review settings May 20, 2026 16:13
@smalis-msft smalis-msft enabled auto-merge (squash) May 20, 2026 16:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_hypervisors into openvmm_resources::hypervisor_resolvers.
  • Moved register_hypervisor_probes! macro from openvmm_core to hypervisor_resources and updated call sites.
  • Adjusted Cargo features/dependencies so openvmm_hypervisors no longer depends on openvmm_core, and openvmm_resources depends directly on virt_* crates and hypervisor_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.

Comment thread openvmm/openvmm_resources/Cargo.toml
Comment thread openvmm/hypervisor_resources/src/lib.rs
Comment thread openvmm/openvmm_resources/src/hypervisor_resolvers.rs
Comment thread openvmm/openvmm_core/src/hypervisor_backend.rs
@github-actions
Copy link
Copy Markdown

Copilot AI review requested due to automatic review settings May 20, 2026 20:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread openvmm/hypervisor_resources/src/lib.rs
Comment thread openvmm/openvmm_resources/src/hypervisor_resolvers.rs
Comment thread vmm_core/vmotherboard/src/base_chipset.rs
Copilot AI review requested due to automatic review settings May 20, 2026 21:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread openvmm/openvmm_resources/src/lib.rs
Comment thread openvmm/openvmm_resources/Cargo.toml
@smalis-msft smalis-msft enabled auto-merge (squash) May 20, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants