RE: [RFC PATCH 03/15] x86/tdx: Add TDG.TDI.RD module call wrapper for TDX Connect

From: Duan, Zhenzhong

Date: Thu Oct 08 2026 - 22:29:01 EST




>-----Original Message-----
>From: Edgecombe, Rick P <rick.p.edgecombe@xxxxxxxxx>
>Subject: Re: [RFC PATCH 03/15] x86/tdx: Add TDG.TDI.RD module call wrapper for
>TDX Connect
>
>On Thu, 2026-10-08 at 06:27 +0000, Duan, Zhenzhong wrote:
>> > But I wonder if something is lost in handling these all by default. Don't we
>> > need to consider each error? For example, if accept gets a busy and we toss
>> > this back. Is the caller supposed to retry? Does it expect to? Or should we
>> > do something to avoid the busy in the first place? We need to at least
>> > examine each possible error condition as part of the implementation.
>>
>> Yes, the current mcall use cases actually don't check for busy returns, so I
>> do the same in this series. I'm operating on the assumption that TD guests are
>> implicitly designed to prevent the TDX module contention that triggers a
>> busy state.
>
>Uh... we are designing the TD guest here... so who are you expecting to do this
>design? But also, the host can take these busy error generating locks too.
>Please investigate the specific errors of these calls you are adding. Ping me or
>Yan offline if you need help deciphering the TDX docs or code around this.

I see, host may contend with TD guest. Will investigate the errors of each TDI mcall.

>
>>
>> For other TDX errors, we don't deeply differentiate between them. To keep
>> things clean, we only map specific errno values to the TDX errors which are
>> more common.
>
>Especially if this is actually intended to be a wider solution, please justify
>specifically what it will help.

Will do.

Thanks
Zhenzhong