]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/sev: Relocate SNP guest messaging routines to common code
authorNikunj A Dadhania <nikunj@amd.com>
Mon, 6 Jan 2025 12:46:24 +0000 (18:16 +0530)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 7 Jan 2025 10:16:46 +0000 (11:16 +0100)
commit1e0b23b5d2d18b2bd2c66d8214072d700a8c350d
treed85df9a390b09eab6d5b3187062ab6010daa10ed
parentc5529418d05079384af4dbbb6f6156344c2ffce2
x86/sev: Relocate SNP guest messaging routines to common code

At present, the SEV guest driver exclusively handles SNP guest messaging. All
routines for sending guest messages are embedded within it.

To support Secure TSC, SEV-SNP guests must communicate with the AMD Security
Processor during early boot. However, these guest messaging functions are not
accessible during early boot since they are currently part of the guest
driver.

Hence, relocate the core SNP guest messaging functions to SEV common code and
provide an API for sending SNP guest messages.

No functional change, but just an export symbol added for
snp_send_guest_request() and dropped the export symbol on
snp_issue_guest_request() and made it static.

Signed-off-by: Nikunj A Dadhania <nikunj@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20250106124633.1418972-5-nikunj@amd.com
arch/x86/coco/sev/core.c
arch/x86/include/asm/sev.h
drivers/virt/coco/sev-guest/sev-guest.c