Skip to content

Refactor 703#728

Draft
kvinwang wants to merge 46 commits into
masterfrom
rebase-703
Draft

Refactor 703#728
kvinwang wants to merge 46 commits into
masterfrom
rebase-703

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

No description provided.

ChrisWorkBot added 30 commits June 12, 2026 04:14
@kvinwang kvinwang force-pushed the rebase-703 branch 6 times, most recently from 80c2182 to dc091e6 Compare June 15, 2026 14:23
kvinwang added 6 commits June 15, 2026 19:38
Unified dstack images now ship both the TDX firmware (ovmf.fd) and the AMD
SEV firmware (ovmf-sev.fd), the latter referenced by a new "bios-sev" field
in metadata.json.

Add ImageInfo::bios_sev and an Image::firmware(is_amd_sev_snp) helper that
returns bios-sev for SEV-SNP guests (falling back to bios) and bios for TDX.
Use it both when launching QEMU (-bios) and when computing the SEV-SNP OVMF
launch measurement, so the measured firmware always matches the launched
one. TDX behaviour is unchanged; images without bios-sev fall back to bios.
`platform = "auto"` (the default) previously always resolved to TDX,
requiring operators to opt into SEV-SNP explicitly. Implement real
detection: AMD SEV-SNP hosts advertise the `sev_snp` CPU flag and Intel
TDX hosts advertise `tdx_host_platform`; these flags are vendor-exclusive
so the flag alone is unambiguous. Unknown hosts still fall back to TDX, and
an explicit `platform = "tdx" | "amd-sev-snp"` always overrides detection.

Combined with the bios-sev firmware selection, an AMD SEV-SNP host with a
default config now auto-launches SEV-SNP guests with the SEV firmware.

Verified on real hardware: AMD EPYC SNP host reports `sev_snp`, Intel TDX
host reports `tdx_host_platform`. Unit tests cover both plus fallback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant