Re: [PATCH 1/2] x86/tdx: Add helper to query maximum TD Quote size
From: Peter Fang
Date: Mon Jul 06 2026 - 06:03:56 EST
On Thu, Jul 02, 2026 at 06:16:21PM +0800, Xiaoyao Li wrote:
> > >
> > > I have another nit other than Kiryl's
> > >
> > > > +u32 tdx_get_max_quote_size(void)
> > > > +{
> > > > + u64 val, ret;
> > > > +
> > > > + ret = tdg_vm_rd(TDCS_QUOTE_MAX_SIZE, &val);
> > > > +
> > > > + return ret ? 0 : (u32)val;
> > > > +}
> > > > +EXPORT_SYMBOL_GPL(tdx_get_max_quote_size);
> > >
> > > Do we need to start to use
> > >
> > > EXPORT_SYMBOL_FOR_MODULES(tdx_get_max_quote_size, "tdx-guest") ?
> > >
> >
> > This makes sense. But can we use a follow-up patch to improve this file
> > later? Right now there are only EXPORT_SYMBOL_GPL() usages, so using
> > EXPORT_SYMBOL_FOR_MODULES() here might look inconsistent.
>
> If maintainers is going to merge the series as-is, then fine.
>
> If we will have a v2, I don't see why cannot update to use
> EXPORT_SYMBOL_FOR_MODULES().
>
> The existing ones can be updated in a separate patch before or after.
Thanks. I will respin a v2 to address some review feedback. But I'd like
to hold off on this improvement unless there's a strong push to do it
right now. I'm going to add this to my list of guest-side cleanup items
for after this series, along with the feedback I got in [1].
[1] https://lore.kernel.org/linux-coco/5f9474ed-bacb-44d5-a0fc-5a29a1e79b60@xxxxxxxxx/