Skip to content

AMD SEV: detect EFI CC Blob in loader - #616

Merged
mkroening merged 1 commit into
hermit-os:mainfrom
zyuiop:feat/sev-cc-blob
Aug 20, 2026
Merged

AMD SEV: detect EFI CC Blob in loader#616
mkroening merged 1 commit into
hermit-os:mainfrom
zyuiop:feat/sev-cc-blob

Conversation

@zyuiop

@zyuiop zyuiop commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

In AMD SEV-SNP, a special page is allocated by the hypervisor to hold secret keys that can be used by the guest to communicate securely with the hardware. The hypervisor puts the address of this page in an area of the EFI Firmware, so we need to read it and forward it to Hermit so that it can use it.

Thanks @sarahspberrypi for the original implementation.

@mkroening mkroening left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! This is generally fine as is; I just have a few tiny suggestions and a question. :)

Comment thread src/fdt.rs Outdated
pub fn cc_blob(mut self, cc_blob: u64) -> FdtWriterResult<Self> {
let cc_blob_node = self
.writer
.begin_node(&format!("hermit,cc_blob@{cc_blob:x}"))?;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Based on the authoritative source that calls this “EFI SNP Confidential Computing Blob”, we were considering efi_sev_snp_cc_blob in the FDT node as well as the functions and variables.

Suggested change
.begin_node(&format!("hermit,cc_blob@{cc_blob:x}"))?;
.begin_node(&format!("hermit,efi_sev_snp_cc_blob@{efi_sev_snp_cc_blob:x}"))?;

On the other hand, Linux calls the GUID EFI_CC_BLOB_GUID. There's also cc_blob and SETU_CC_BLOB.

I am not sure; I just want to double-check before committing to a name. What do you think? :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think we should check if TDX also has a cc blob, in which case we should probably go for cc_blob in the FDT, which could be reused for a future TDX implementation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok apparently there is no such thing in TDX world, so we can commit to your new naming

Comment thread src/os/uefi/mod.rs Outdated
Comment thread src/os/uefi/mod.rs Outdated
@mkroening mkroening self-assigned this Aug 20, 2026

@mkroening mkroening left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! :)

@mkroening
mkroening enabled auto-merge August 20, 2026 11:44
@mkroening
mkroening added this pull request to the merge queue Aug 20, 2026
Merged via the queue into hermit-os:main with commit 95239ff Aug 20, 2026
6 checks passed
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.

2 participants