Re: [PATCH v2 10/31] x86/virt/tdx: Add extra memory to TDX Module for Extensions
From: Huang, Kai
Date: Thu Apr 23 2026 - 18:29:52 EST
On Thu, 2026-04-23 at 17:05 +0000, Edgecombe, Rick P wrote:
> On Thu, 2026-04-23 at 00:59 +0000, Huang, Kai wrote:
> > Ditto here. I don't think we should introduce any more cond_resched().
> >
> > Btw, I think technically we can reuse the seamcall_ir_resched() you introduced
> > later, albeit in which a local '_args' is used as a copy of the original 'args',
> > but that has no harm for the case where we can just use the 'args' to loop.
> >
> > I am wondering whether we can just use that here, or we just get rid of that
> > helper (then open retry by the callers of these SEAMCALL wrappers), since there
> > will be more cases where we need to manually set 'resume=1' in the SEAMCALL
> > input 'args' when retrying TDX_INTERRUPTED_RESUMABLE.
>
> I kind of like the latter option to open code more of this stuff. The stacks of
> seamcall wrapper macros is already too much.
Agreed.
And SEAMCALL *users* can actually come up with their own version of wrapper(s)
to do the retry. E.g., currently seamcall_ir_resched() is only used for IOMMU
SEAMCALLs, and we can put this wrapper in the IOMMU code or coco/tdx-host.