Re: [PATCHv2 01/12] x86/tdx: Consolidate TDX error handling

From: Dave Hansen
Date: Thu Jun 26 2025 - 13:00:54 EST


On 6/26/25 08:51, Sean Christopherson wrote:
> No, I was thinking:
>
> if (IS_TDX_ERR_OPERAND_BUSY(err))
>
> e.g. to so that it looks like IS_ERR(), which is a familiar pattern.

That would be a more more compelling if IS_ERR() worked on integers. It
works on pointers, so I'm not sure it's a pattern we want to apply to
integers here.

I kind of hate all of this. I'd kinda prefer that we just shove the TDX
error codes as far up into the helpers as possible rather than making
them easier to deal with in random code.