-
Notifications
You must be signed in to change notification settings - Fork 161
RFC: sidecar: allow openhcl_boot to specify a state per-cpu, and have openhcl_boot set that state for VPs that have mapped interrupts #2477
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
…hcl_boot set that state for VPs that have mapped interrupts
|
This PR modifies files containing For more on why we check whole files, instead of just diffs, check out the Rustonomicon |
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 introduces a mechanism for openhcl_boot to specify per-CPU startup state, allowing it to control which CPUs are started by the sidecar kernel versus the main kernel. This optimization enables CPUs with mapped interrupts to be started immediately by the main kernel, avoiding unnecessary transitions.
Key changes:
- Adds
PerCpuStatestructure to track which CPUs should be started by sidecar - Updates sidecar initialization to respect per-CPU state overrides when specified
- Modifies the boot process to identify CPUs with mapped interrupts and keep them in the main kernel
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| openhcl/sidecar_defs/src/lib.rs | Defines PerCpuState structure and adds it to SidecarParams |
| openhcl/sidecar/src/arch/x86_64/init.rs | Updates sidecar init to apply per-CPU state overrides to cpu_status array |
| openhcl/openhcl_boot/src/sidecar.rs | Modifies sidecar startup and kernel command line generation to use per-CPU state |
| openhcl/openhcl_boot/src/main.rs | Initializes sidecar_cpu_overrides in test code |
| openhcl/openhcl_boot/src/host_params/mod.rs | Adds sidecar_cpu_overrides field to PartitionInfo |
| openhcl/openhcl_boot/src/host_params/dt/mod.rs | Identifies CPUs with mapped interrupts and configures them to stay in main kernel |
DO NOT MERGE, TESTING IN PROGRESS
Experiment: ask the kernel to online any CPUs that will immediately get interrupts mapped, and ask sidecar
to online the rest.