Re: [PATCH v11 12/20] x86/sev: Relocate SNP guest messaging routines to common code

From: Tom Lendacky
Date: Fri Sep 13 2024 - 12:27:28 EST


On 7/31/24 10:08, Nikunj A Dadhania wrote:
> At present, the SEV guest driver exclusively handles SNP guest messaging.
> All routines for sending guest messages are embedded within the guest
> driver. 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.

That means we can drop the export symbol on snp_issue_guest_request() and
make it static, right?

>
> Signed-off-by: Nikunj A Dadhania <nikunj@xxxxxxx>

Reviewed-by: Tom Lendacky <thomas.lendacky@xxxxxxx>

> ---
> arch/x86/include/asm/sev.h | 8 +
> arch/x86/coco/sev/core.c | 284 +++++++++++++++++++++++
> drivers/virt/coco/sev-guest/sev-guest.c | 286 ------------------------
> arch/x86/Kconfig | 1 +
> drivers/virt/coco/sev-guest/Kconfig | 1 -
> 5 files changed, 293 insertions(+), 287 deletions(-)