Skip to content

Conversation

@mattkur
Copy link
Contributor

@mattkur mattkur commented Dec 5, 2025

Co-draft, with CoPilot, some additional documentation for the OpenHCL boot process and sidecar. I focused on some of the questions that I've recently had about how this stuff works.

Copilot AI review requested due to automatic review settings December 5, 2025 03:53
@mattkur mattkur requested a review from a team as a code owner December 5, 2025 03:53
@github-actions github-actions bot added the Guide label Dec 5, 2025
@mattkur
Copy link
Contributor Author

mattkur commented Dec 5, 2025

@jstarks , @chris-oo , @smalis-msft : interested in your reviews in particular. I hope I got it right, but could use your help to make sure my understanding is correct.

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 adds documentation to explain the OpenHCL sidecar boot process, specifically focusing on how the bootstrap processor (BSP) initializes the system and how application processors (APs) are started using a fan-out pattern. The documentation describes the concurrency management through atomic counters and page table setup for control page access.

Key Changes

  • Added a "Processor Startup" section to the sidecar module documentation explaining the boot sequence
  • Added a reference to a new documentation file in the Guide's SUMMARY.md

Reviewed changes

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

File Description
openhcl/sidecar/src/main.rs Adds comprehensive documentation about the sidecar boot process, including BSP initialization, AP startup fan-out pattern, and control page mapping
Guide/src/SUMMARY.md Adds a new entry for "Boot Process" documentation under OpenHCL Architecture section

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

//!
//! # Processor Startup
//!
//! The sidecar kernel is initialized by a single bootstrap processor (BSP),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this all true even with multiple numa nodes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I see your confusion and have updated the docs to better reflect this.

The sidecar kernel:
- Runs independently on each CPU with minimal memory footprint
- Executes a simple dispatch loop, halting until needed
- Handles VP (virtual processor) run commands from the host VMM
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this specific to the sidecar kernel? If not, what are some example commands that can be sent from the host VMM?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorta. I'll try to address this once I get back to working on the Sidecar side of things. But this is the kind of stuff:

- Runs independently on each CPU with minimal memory footprint
- Executes a simple dispatch loop, halting until needed
- Handles VP (virtual processor) run commands from the host VMM
- Can be converted to a Linux CPU on demand if more complex processing is required
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there some example scenarios that we can enumerate here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left it brief, but all our IO handling happens per-CPU. The CPU needs to be a "Linux" CPU at that point. Think of sidecar as handling only VM exits, but not anything you'd expect to see in the openhcl bin.

@mattkur
Copy link
Contributor Author

mattkur commented Dec 5, 2025

Thanks @smalis-msft and @damanm24 for the feedback! As I suspected, I've learned from your comments :) I'll incorporate them (though I may defer some of the additions to a later date).

Copy link
Contributor Author

@mattkur mattkur left a comment

Choose a reason for hiding this comment

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

Thanks for the first round of feedback!

- Runs independently on each CPU with minimal memory footprint
- Executes a simple dispatch loop, halting until needed
- Handles VP (virtual processor) run commands from the host VMM
- Can be converted to a Linux CPU on demand if more complex processing is required
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left it brief, but all our IO handling happens per-CPU. The CPU needs to be a "Linux" CPU at that point. Think of sidecar as handling only VM exits, but not anything you'd expect to see in the openhcl bin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants