Re: [RFC PATCH 09/15] x86/virt/tdx: Add interface to generate a Quote

From: Xu Yilun

Date: Thu Jul 02 2026 - 11:59:36 EST


> > +
> > + do {
> > + r = seamcall_ret(TDH_QUOTE_GET, &args);
> > + } while (r == TDX_INTERRUPTED_RESUMABLE);
>
>
> nit: This pattern seems to repeat a lot, might be worth it to consider
> introducing a wrapper similar to existing sc_retry?

We didn't make the wrapper because TDX_INTERRUPTED_RESUMABLE can't be
handled in a unified way for all SEAMCALLs, I see 2 conventions:

1. Host should set a resume=1 parameter on retry, such as
TDH_PHYMEM_CACHE_WB, and several migration SEAMCALLs,
TDH.EXPORT.MEM, TDH.EXPORT.STATE.XXX

2. Host just refills the previous args (may have been modified by seamcall
output) on retry. such as TDH_EXT_INIT, TDH_EXT_MEM_ADD,
TDH_QUOTE_INIT, TDH_QUOTE_GET...

Making a helper that can't cover all interrupted resumable case may
cause more confusing. BTW, there are already many seamcall wrappers, we
need to carefully evaluate if it is worth adding new wrappers, for now I
don't think so.