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

From: Nikunj A. Dadhania
Date: Mon Sep 16 2024 - 00:42:48 EST




On 9/13/2024 9:57 PM, Tom Lendacky wrote:
> 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?

Yes, let me remove that.

>
>>
>> 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(-)

Regards
Nikunj