Skip to content

cli: add SNP ID block annotations to Pods based on CPU requirements#2214

Merged
daniel-weisse merged 6 commits intomainfrom
dw/cli-id-block-generation
Apr 1, 2026
Merged

cli: add SNP ID block annotations to Pods based on CPU requirements#2214
daniel-weisse merged 6 commits intomainfrom
dw/cli-id-block-generation

Conversation

@daniel-weisse
Copy link
Copy Markdown
Member

  • Update reference value generation to create SNP reference values for up to 8 vCPUs
    • This can be adjusted at will, but since each CPU variation results in one more entry in the generated manifest, larger numbers will immensely blow up the size of the manifest
  • Update ID block generation to calculate ID blocks for up to 8 vCPUs
  • Embed ID block mappings the the CLI and annotate Pods during contrast generate with the ID blocks required for the requested CPU amount

@daniel-weisse daniel-weisse added the changelog PRs that should be part of the release notes label Feb 26, 2026
@daniel-weisse daniel-weisse force-pushed the dw/cli-id-block-generation branch 7 times, most recently from 2287b59 to 6de728d Compare March 3, 2026 14:23
@daniel-weisse daniel-weisse marked this pull request as ready for review March 4, 2026 08:48
@daniel-weisse daniel-weisse force-pushed the dw/cli-id-block-generation branch 3 times, most recently from 3acb557 to 6fd606e Compare March 5, 2026 14:21
@daniel-weisse daniel-weisse requested a review from charludo March 9, 2026 14:35
@daniel-weisse daniel-weisse force-pushed the dw/cli-id-block-generation branch 2 times, most recently from 0304e90 to f63b942 Compare March 9, 2026 14:48
@burgerdev burgerdev self-assigned this Mar 10, 2026
Comment thread cli/cmd/common.go Outdated
Comment thread cli/cmd/generate.go
Comment thread cli/cmd/generate.go Outdated
Comment thread packages/by-name/contrast/reference-values/package.nix Outdated
Comment thread packages/by-name/contrast/snp-id-blocks/package.nix Outdated
Comment thread cli/cmd/generate.go Outdated
Comment thread packages/by-name/contrast/reference-values/package.nix Outdated
@daniel-weisse daniel-weisse force-pushed the dw/cli-id-block-generation branch 2 times, most recently from 59f9a72 to cf6cec9 Compare March 16, 2026 14:17
Copy link
Copy Markdown
Member

@msanft msanft left a comment

Choose a reason for hiding this comment

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

I think this will work, but I'm a little unsure about the current interface we expose to the user.

Comment thread cli/cmd/common.go Outdated
Comment thread cli/cmd/generate.go Outdated
Comment thread cli/cmd/generate.go
Comment thread packages/by-name/contrast/reference-values/package.nix
Comment thread packages/by-name/kata/runtime/package.nix
@msanft
Copy link
Copy Markdown
Member

msanft commented Mar 24, 2026

@burgerdev, @charludo; Addressed my own feedback, PTAL.

@msanft msanft requested review from burgerdev and charludo March 24, 2026 13:57
Copy link
Copy Markdown
Collaborator

@charludo charludo left a comment

Choose a reason for hiding this comment

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

fixup changes LGTM; have not looked into the still-open conversation.

@charludo charludo force-pushed the dw/cli-id-block-generation branch 3 times, most recently from 61a5bd1 to 863a238 Compare March 27, 2026 12:34
@charludo charludo force-pushed the dw/cli-id-block-generation branch from 863a238 to 9c5afa4 Compare March 27, 2026 12:49
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 30, 2026

Do the documentation changes need to be backported?

Changes to /docs/docs won't be visible until the next release.
If you are fixing something in the docs that should be immediately visible, the changes needs to be made to both /docs/docs and /docs/versioned_docs/version-X.Y, where X.Y is the version of the latest minor release.
This can be done in this same PR.

  • Yes, this should be backported to the current version of the docs.
  • No, the PR only contains docs changes relevant for future versions.

@daniel-weisse daniel-weisse force-pushed the dw/cli-id-block-generation branch from c332a4c to 187a732 Compare March 30, 2026 10:55
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 30, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-04-01 06:38 UTC

@daniel-weisse daniel-weisse force-pushed the dw/cli-id-block-generation branch from 187a732 to 0fcf87e Compare March 30, 2026 11:42
@daniel-weisse daniel-weisse requested a review from msanft March 30, 2026 12:35
Copy link
Copy Markdown
Member

@burgerdev burgerdev left a comment

Choose a reason for hiding this comment

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

Thanks everyone, lgtm!

@daniel-weisse
Copy link
Copy Markdown
Member Author

daniel-weisse commented Mar 31, 2026

I'll merge this now and then clean up and rebase #2227 for a final review, or do we want to merge everything as one?

daniel-weisse and others added 6 commits March 31, 2026 16:27
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Not specifying `nr_cpus` on the command line
costs us marginal amounts of memory while saving
complexity in the TDX RTMR pre-calculation.
By dropping this from the command line, we make the
kernel fall back to the `CONFIG_NR_CPUS=240`
kconfig variable.
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
@daniel-weisse daniel-weisse force-pushed the dw/cli-id-block-generation branch from 0fcf87e to 6151a52 Compare March 31, 2026 14:27
@charludo
Copy link
Copy Markdown
Collaborator

charludo commented Apr 1, 2026

@daniel-weisse feel free to merge into main!

@daniel-weisse daniel-weisse merged commit cf9237f into main Apr 1, 2026
21 checks passed
@daniel-weisse daniel-weisse deleted the dw/cli-id-block-generation branch April 1, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog PRs that should be part of the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants