Refactor 703#728
Draft
kvinwang wants to merge 46 commits into
Draft
Conversation
added 30 commits
June 12, 2026 04:14
80c2182 to
dc091e6
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.