Re: [PATCH v9 03/24] virt: sev-guest: Make payload a variable length array

Tom Lendacky
2024-06-17T20:51:44Z

On 5/30/24 23:30, Nikunj A Dadhania wrote:
> Currently, guest message is PAGE_SIZE bytes and payload is hard-coded to
> 4000 bytes, assuming snp_guest_msg_hdr structure as 96 bytes.
>
> Remove the structure size assumption and hard-coding of payload size and
> instead use variable length array.
>
> While at it, rename the local guest message variables for clarity.
>
> Signed-off-by: Nikunj A Dadhania <nikunj@amd.com>
> Suggested-by: Tom Lendacky <thomas.lendacky@amd.com>

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

> ---
> drivers/virt/coco/sev-guest/sev-guest.h | 5 +-
> drivers/virt/coco/sev-guest/sev-guest.c | 74 +++++++++++++++----------
> 2 files changed, 48 insertions(+), 31 deletions(-)
>