-
Notifications
You must be signed in to change notification settings - Fork 161
guide/sidecar: expand docs on how openhcl boots #2542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@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. |
There was a problem hiding this 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 |
There was a problem hiding this 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), |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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:
openvmm/openhcl/sidecar_client/src/lib.rs
Line 54 in 71608f1
| mod ioctl { |
| - 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
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). |
mattkur
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
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.