Re: [PATCH v5 2/6] virt: tdx-guest: Give the Quote buffer an explicit type

From: Binbin Wu

Date: Mon Sep 28 2026 - 22:16:31 EST


On 9/28/2026 6:08 PM, Peter Fang wrote:
> The Quote buffer is always a "struct tdx_quote_buf", but its global
> pointer is a "void *". A function would have to convert it back to make
> sense of it.
>
> Declare the global with its actual type, and give it a better name.
>
> This creates variable shadowing in wait_for_quote_completion(), so
> rename its parameter for clarity.
>
> AI was used under supervision to collect/apply feedback, review code and
> workshop logs.
>
> Signed-off-by: Peter Fang <peter.fang@xxxxxxxxx>

Reviewed-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>

One nit below.

> ---
> v5:
> - New patch. [Dave]
> ---
> drivers/virt/coco/tdx-guest/tdx-guest.c | 35 ++++++++++++-------------
> 1 file changed, 17 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/virt/coco/tdx-guest/tdx-guest.c b/drivers/virt/coco/tdx-guest/tdx-guest.c
> index d0303e31e816..896eb0a09c4a 100644
> --- a/drivers/virt/coco/tdx-guest/tdx-guest.c
> +++ b/drivers/virt/coco/tdx-guest/tdx-guest.c
> @@ -192,7 +192,7 @@ struct tdx_quote_buf {
> };
>
> /* Quote data buffer */

The comment should be updated as well.

"Quote buffer" or "Quote request buffer"?

> -static void *quote_data;
> +static struct tdx_quote_buf *quote_buf;
>