Re: [PATCH v4 3/4] virt: tdx-guest: Use a variable to store the Quote buffer size
From: Xiaoyao Li
Date: Tue Sep 22 2026 - 06:06:49 EST
On 9/15/2026 5:26 PM, Peter Fang wrote:
> In preparation for dynamic Quote buffer size, replace the fixed size
> constant with a variable.
>
> The constant is sprinkled across several places. Read the size from the
> variable instead.
>
> Signed-off-by: Peter Fang <peter.fang@xxxxxxxxx>
> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
> Reviewed-by: Tony Lindgren <tony.lindgren@xxxxxxxxxxxxxxx>
> Reviewed-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>
Reviewed-by: Xiaoyao Li <xiaoyao.li@xxxxxxxxx>
One thing below,
...
> @@ -417,7 +416,8 @@ static int __init tdx_guest_init(void)
> if (ret)
> goto deinit_mr;
>
> - quote_data = alloc_quote_buf();
> + quote_data_len = PAGE_ALIGN(GET_QUOTE_BUF_SIZE);
> + quote_data = alloc_quote_buf(quote_data_len);
since quote_data_len is a global variable, it looks no need to pass it around.
Same for free_quote_buf()