Skip to content

sidecar: vp offline diagnostic logging#2967

Merged
sunilmut merged 1 commit intomicrosoft:mainfrom
sunilmut:user/sunilmut/vp_offline_logging
Mar 17, 2026
Merged

sidecar: vp offline diagnostic logging#2967
sunilmut merged 1 commit intomicrosoft:mainfrom
sunilmut:user/sunilmut/vp_offline_logging

Conversation

@sunilmut
Copy link
Member

When sidecar is not enabled, VP startup should indicate proper logging to as not confuse with sidecar.

@sunilmut sunilmut requested a review from a team as a code owner March 13, 2026 00:27
Copilot AI review requested due to automatic review settings March 13, 2026 00:27
@github-actions github-actions bot added the unsafe Related to unsafe code label Mar 13, 2026
@github-actions
Copy link

⚠️ Unsafe Code Detected

This PR modifies files containing unsafe Rust code. Extra scrutiny is required during review.

For more on why we check whole files, instead of just diffs, check out the Rustonomicon

Copy link
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

This PR improves VP startup diagnostics in OpenHCL when a VP’s target CPU is offline, by distinguishing the “offline CPU but no sidecar available” case from the “offline CPU handled via sidecar” path to avoid misleading sidecar-related behavior/logging.

Changes:

  • Add sidecar_enabled() plumbing from HclUhProcessorBox.
  • In VP spawn logic, bail out early if the CPU is offline and sidecar support is not enabled (instead of proceeding into sidecar startup paths).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
openhcl/virt_mshv_vtl/src/lib.rs Exposes UhProcessorBox::sidecar_enabled() to query sidecar availability.
openhcl/underhill_core/src/vp.rs Adds an early error path for offline CPUs when sidecar isn’t enabled.
openhcl/hcl/src/ioctl.rs Adds Hcl::sidecar_enabled() based on whether a SidecarClient is present.

// The CPU is not online, so this should be a sidecar VP. Run the VP
// No sidecar and the CPU is offline; this VP cannot run.
if !self.vp.sidecar_enabled() {
anyhow::bail!("cpu {} is offline", self.cpu);
@sunilmut sunilmut merged commit 6bc37a2 into microsoft:main Mar 17, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unsafe Related to unsafe code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants