Re: [PATCH v1 12/26] crypto: ccp: Define the SEV-SNP commands
From: Borislav Petkov <bp@alien8.de>
Date: 2024-01-15 09:42:01
Also in:
kvm, linux-crypto, linux-mm, lkml
Subsystem:
the rest · Maintainer:
Linus Torvalds
On Sat, Dec 30, 2023 at 10:19:40AM -0600, Michael Roth wrote:
From: Brijesh Singh <redacted>
AMD introduced the next generation of SEV called SEV-SNP (Secure Nested
Paging). SEV-SNP builds upon existing SEV and SEV-ES functionality
while adding new hardware security protection.
Define the commands and structures used to communicate with the AMD-SP
when creating and managing the SEV-SNP guests. The SEV-SNP firmware spec
is available at developer.amd.com/sev.
Co-developed-by: Ashish Kalra <ashish.kalra@amd.com>
Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Signed-off-by: Brijesh Singh <redacted>
[mdr: update SNP command list and SNP status struct based on current
spec, use C99 flexible arrays, fix kernel-doc issues]
Signed-off-by: Michael Roth <redacted>
---
drivers/crypto/ccp/sev-dev.c | 16 +++
include/linux/psp-sev.h | 264 +++++++++++++++++++++++++++++++++++
include/uapi/linux/psp-sev.h | 56 ++++++++
3 files changed, 336 insertions(+)More ignored feedback: https://lore.kernel.org/r/20231124143630.GKZWC07hjqxkf60ni4@fat_crate.local (local) Lemme send it to you as a diff then - it'll work then perhaps.
diff --git a/include/linux/psp-sev.h b/include/linux/psp-sev.h
index 983d314b5ff5..1a76b5297f03 100644
--- a/include/linux/psp-sev.h
+++ b/include/linux/psp-sev.h@@ -104,7 +104,7 @@ enum sev_cmd { SEV_CMD_SNP_PAGE_RECLAIM = 0x0C7, SEV_CMD_SNP_PAGE_UNSMASH = 0x0C8, SEV_CMD_SNP_CONFIG = 0x0C9, - SEV_CMD_SNP_DOWNLOAD_FIRMWARE_EX = 0x0CA, + SEV_CMD_SNP_DOWNLOAD_FIRMWARE_EX = 0x0CA, SEV_CMD_SNP_COMMIT = 0x0CB, SEV_CMD_SNP_VLEK_LOAD = 0x0CD,
@@ -624,7 +624,8 @@ enum { * @gctx_paddr: system physical address of guest context page * @page_size: page size 0 indicates 4K and 1 indicates 2MB page * @page_type: encoded page type - * @imi_page: indicates that this page is part of the IMI of the guest + * @imi_page: indicates that this page is part of the IMI (Incoming + * Migration Image) of the guest * @rsvd: reserved * @rsvd2: reserved * @address: system physical address of destination page to encrypt
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette