[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yhoysoqiqcof3uf723p2chqmnfbcyw5nucn6uke6vfrsknui3o@tsm64jev6ngt>
Date: Fri, 27 Jun 2025 13:42:31 +0300
From: "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Sean Christopherson <seanjc@...gle.com>,
Rick P Edgecombe <rick.p.edgecombe@...el.com>, "pbonzini@...hat.com" <pbonzini@...hat.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>, Chao Gao <chao.gao@...el.com>, "bp@...en8.de" <bp@...en8.de>,
Kai Huang <kai.huang@...el.com>, "x86@...nel.org" <x86@...nel.org>,
"mingo@...hat.com" <mingo@...hat.com>, Yan Y Zhao <yan.y.zhao@...el.com>,
"tglx@...utronix.de" <tglx@...utronix.de>, "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>, Isaku Yamahata <isaku.yamahata@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCHv2 01/12] x86/tdx: Consolidate TDX error handling
On Thu, Jun 26, 2025 at 09:59:47AM -0700, Dave Hansen wrote:
> 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.
IS_ERR_VALUE() works on integers.
> 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.
Stripping info from error code early in handling can backfire if we ever
would need this inf (like need to know which argument is problematic). We
suddenly can suddenly be in position to rework all callers.
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists