[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8c5aca4bacb31475a510e6a109956e7fa4a63de5.camel@intel.com>
Date: Fri, 30 Jan 2026 00:36:54 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "Hansen, Dave" <dave.hansen@...el.com>, "seanjc@...gle.com"
<seanjc@...gle.com>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>, "linux-coco@...ts.linux.dev"
<linux-coco@...ts.linux.dev>, "Huang, Kai" <kai.huang@...el.com>, "Li,
Xiaoyao" <xiaoyao.li@...el.com>, "Zhao, Yan Y" <yan.y.zhao@...el.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>, "kas@...nel.org"
<kas@...nel.org>, "binbin.wu@...ux.intel.com" <binbin.wu@...ux.intel.com>,
"mingo@...hat.com" <mingo@...hat.com>, "pbonzini@...hat.com"
<pbonzini@...hat.com>, "ackerleytng@...gle.com" <ackerleytng@...gle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Yamahata,
Isaku" <isaku.yamahata@...el.com>, "sagis@...gle.com" <sagis@...gle.com>,
"tglx@...nel.org" <tglx@...nel.org>, "bp@...en8.de" <bp@...en8.de>,
"Annapurve, Vishal" <vannapurve@...gle.com>, "x86@...nel.org"
<x86@...nel.org>
Subject: Re: [RFC PATCH v5 11/45] x86/tdx: Add helpers to check return status
codes
On Thu, 2026-01-29 at 12:35 -0800, Sean Christopherson wrote:
> On Thu, Jan 29, 2026, Dave Hansen wrote:
> > On 1/28/26 17:14, Sean Christopherson wrote:
> > ...
> > > err = tdh_mng_vpflushdone(&kvm_tdx->td);
> > > - if (err == TDX_FLUSHVP_NOT_DONE)
> > > + if (IS_TDX_FLUSHVP_NOT_DONE(err))
> > > goto out;
> > > if (TDX_BUG_ON(err, TDH_MNG_VPFLUSHDONE, kvm)) {
> >
> > I really despise the non-csopeable, non-ctaggable, non-greppable names
> > like this. Sometimes it's unavoidable. Is it really unavoidable here?
> >
> > Something like this is succinct enough and doesn't have any magic ##
> > macro definitions:
> >
> > TDX_ERR_EQ(err, TDX_FLUSHVP_NOT_DONE)
I like the editor friendliness. The only downside is that it puts the onus on
the caller to make sure supported defines are passed into TDX_ERR_EQ(). Today
there are a few special cases like IS_TDX_NON_RECOVERABLE().
I don't know, I'm ok either way. I lean towards keeping it as in this patch
because we already had an error code bit interpretation bug:
https://lore.kernel.org/kvm/24d2f165-f854-4996-89cf-28d644c592a3@intel.com/
So the centralization of bit interpretation seems like a real win.
>
> FWIW, I have zero preference on this. I included the patch purely because it was
> already there.
Ha, actually we all had a long thread on this:
https://lore.kernel.org/kvm/70484aa1b553ca250d893f80b2687b5d915e5309.camel@intel.com/
I see now that we closed it with you but never got Dave's final buy in.
Powered by blists - more mailing lists