Skip to content

openhcl_boot: start skipped singleton CPUs in Linux with sidecar - #5234

Merged
Sunil Muthuswamy (sunilmut) merged 3 commits into
microsoft:mainfrom
sunilmut:user/sunilmut/sidecar-singleton-cpu-repro
Nov 26, 2026
Merged

Sunil Muthuswamy (sunilmut) merged 3 commits into
microsoft:mainfrom
sunilmut:user/sunilmut/sidecar-singleton-cpu-repro

Conversation

@sunilmut

Copy link
Copy Markdown
Member

With sidecar enabled and default CPU assignment, NUMA nodes with a single CPU
are skipped for sidecar (the comment says they are kernel-started), but the
Linux boot_cpus= list was built only from the retained sidecar nodes' base
CPUs. Those singleton CPUs were therefore assigned to neither Linux nor
sidecar, and VP startup could later fail with a missing sidecar-node mapping.

This change builds the default Linux boot list from every CPU except the
application processors inside retained sidecar nodes, so node base CPUs and
CPUs outside any retained node start in Linux. Explicit per-CPU overrides and
sidecar-node creation are unchanged.

Test changes:

  • Singleton-CPU regression and a multi-node gap regression (both failed
    before the fix).
  • Final Linux CPU lists for small and large configurations: singleton gaps,
    adjacent nodes, mixed per-CPU overrides, and 96, 1024, and 3000 CPUs with
    uneven NUMA groups (3000 covers formatting beyond the 2048-CPU boot limit).

Add a regression for a skipped singleton NUMA CPU missing from the
default boot_cpus list when sidecar is enabled.

Add controls for sidecar AP ownership and explicit per-CPU overrides.
The regression intentionally fails until the production fix is applied.
Include CPUs outside retained sidecar nodes in the Linux boot list.
Keep node base CPUs with Linux and leave their other CPUs with sidecar.
Preserve explicit per-CPU startup overrides.

Add a regression covering skipped CPUs between and after sidecar nodes.
The original singleton regression now passes.
Check final Linux CPU lists for small and large configurations.
Cover singleton gaps, adjacent nodes, and mixed per-CPU overrides.
Include 96, 1024, and 3000 CPUs with uneven prepared NUMA groups.
The 3000-CPU case tests formatting beyond the 2048-CPU boot limit.
@sunilmut
Sunil Muthuswamy (sunilmut) requested a review from a team as a code owner November 23, 2026 00:33
Copilot AI balanced review requested due to automatic review settings November 23, 2026 00:33
@github-actions github-actions Bot added the unsafe Related to unsafe code label Nov 23, 2026
@github-actions

Copy link
Copy Markdown

⚠️ 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the fix assigning CPUs in skipped singleton NUMA nodes to Linux.

No open issues 🎉

What changed in this PR

Fixes OpenHCL’s default CPU assignment with sidecar enabled so CPUs in skipped singleton NUMA nodes start in Linux rather than remaining unassigned.

Changes:

  • Builds boot_cpus= from all CPUs except application processors within retained sidecar nodes.
  • Preserves explicit per-CPU overrides and sidecar-node creation.
  • Adds regression tests for singleton gaps, adjacent nodes, mixed overrides, and large CPU configurations.
File Description
openhcl/​openhcl_boot/​src/​sidecar.rs Corrects the default Linux boot CPU list and adds CPU-assignment formatting tests.

Review effort: Balanced

@sunilmut
Sunil Muthuswamy (sunilmut) merged commit 35dfc23 into microsoft:main Nov 26, 2026
170 of 177 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