Skip to content

RFC Implement SNP DOWNLOAD_FIRMWARE_EX support

Tycho Andersen linux-crypto lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6crypto/ccp: Hoist kernel part of SNP_PLATFORM_STATUSdrivers/crypto/ccp/sev-dev.c+23 -80 replies
2/6crypto/ccp: Allow snp_get_platform_data() after SNP initdrivers/crypto/ccp/sev-dev.c+21 -100 replies
3/6crypto/ccp: Add DOWNLOAD_FIRMWARE_EX message structdrivers/crypto/ccp/sev-dev.c include/linux/psp-sev.h+21 -00 replies
4/6crypto/ccp: Reclaim command buffer when the PSP diesdrivers/crypto/ccp/sev-dev.c+32 -280 replies
5/6crypto/ccp: Register with fw_uploader and always faildrivers/crypto/ccp/sev-dev.c drivers/crypto/ccp/sev-dev.h+54 -00 replies
6/6crypto/ccp: Implement SNP firmware live updatedrivers/crypto/ccp/sev-dev.c+243 -16 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC v1 0/6] Implement SNP DOWNLOAD_FIRMWARE_EX support

From: "Tycho Andersen (AMD)" <[email protected]>

Here is an implementation of the SEV-SNP firmware's DOWNLOAD_FIRMWARE_EX command. The core difference between this and the previous implementation
https://lore.kernel.org/lkml/[email protected]/
is that it relies on the SEV firmware's state (WORKING) to indicate that there are legacy VMs running instead of tracking things explicitly via ASID.

There is a race condition in slide 18 of
https://pretalx.com/media/kvm-forum-2025/submissions/TAMRR8/resources/SEV_FW_Hotl_zfT5e9Y.pdf
which this series does not address, I am still trying to understand what the best way to fix that is.

Also note that patch 1 is a duplicate of
https://lore.kernel.org/all/[email protected]/
so it can be dropped when that is applied.

Thanks,

Tycho

Tycho Andersen (AMD) (6):
crypto/ccp: Hoist kernel part of SNP_PLATFORM_STATUS crypto/ccp: Allow snp_get_platform_data() after SNP init crypto/ccp: Add DOWNLOAD_FIRMWARE_EX message struct crypto/ccp: Reclaim command buffer when the PSP dies crypto/ccp: Register with fw_uploader and always fail crypto/ccp: Implement SNP firmware live update

 drivers/crypto/ccp/sev-dev.c | 416 +++++++++++++++++++++++++++++++----
 drivers/crypto/ccp/sev-dev.h |   3 +
 include/linux/psp-sev.h      |  20 ++
 3 files changed, 393 insertions(+), 46 deletions(-)

base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731

Signature · 1 line
2.54.0