Re: [PATCH v3 3/4] virt: tdx-guest: Use a variable to store the Quote buffer size
From: Peter Fang
Date: Fri Sep 04 2026 - 01:07:36 EST
On Thu, Sep 03, 2026 at 09:31:28AM +0300, Tony Lindgren wrote:
> On Wed, Jul 29, 2026 at 05:29:33AM -0700, Peter Fang wrote:
> > In preparation for dynamic Quote buffer sizes, replace the fixed size
> > constant with a variable.
> >
> > The size is currently a constant sprinkled across several places. Store
> > it in a variable and have all the users read it from there.
> ...
> > --- a/drivers/virt/coco/tdx-guest/tdx-guest.c
> > +++ b/drivers/virt/coco/tdx-guest/tdx-guest.c
> > @@ -417,7 +416,8 @@ static int __init tdx_guest_init(void)
> > if (ret)
> > goto deinit_mr;
> >
> > - quote_data = alloc_quote_buf();
> > + quote_data_len = GET_QUOTE_BUF_SIZE;
> > + quote_data = alloc_quote_buf(quote_data_len);
> > if (!quote_data) {
> > pr_err("Failed to allocate Quote buffer\n");
> > ret = -ENOMEM;
>
> I assume the quote_data_len does not need to change after init because
> of a TDX module update. So:
>
> Reviewed-by: Tony Lindgren <tony.lindgren@xxxxxxxxxxxxxxx>
Yep true. Thanks Tony!