[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5572f420f438a1b95224dcbbe3de780cc1458c91.camel@intel.com>
Date: Tue, 5 Dec 2023 20:58:27 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "bp@...en8.de" <bp@...en8.de>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"Williams, Dan J" <dan.j.williams@...el.com>,
"Hansen, Dave" <dave.hansen@...el.com>,
"Luck, Tony" <tony.luck@...el.com>,
"bagasdotme@...il.com" <bagasdotme@...il.com>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"david@...hat.com" <david@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
"seanjc@...gle.com" <seanjc@...gle.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"mingo@...hat.com" <mingo@...hat.com>,
"Yamahata, Isaku" <isaku.yamahata@...el.com>,
"nik.borisov@...e.com" <nik.borisov@...e.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"hpa@...or.com" <hpa@...or.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"imammedo@...hat.com" <imammedo@...hat.com>,
"sagis@...gle.com" <sagis@...gle.com>,
"Gao, Chao" <chao.gao@...el.com>,
"Brown, Len" <len.brown@...el.com>,
"rafael@...nel.org" <rafael@...nel.org>,
"sathyanarayanan.kuppuswamy@...ux.intel.com"
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
"Huang, Ying" <ying.huang@...el.com>,
"x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH v15 22/23] x86/mce: Improve error log of kernel space TDX
#MC due to erratum
On Tue, 2023-12-05 at 21:41 +0100, Borislav Petkov wrote:
> On Tue, Dec 05, 2023 at 08:33:14PM +0000, Huang, Kai wrote:
> > Yes I understand what you said. My point is X86_FEATURE_TDX doesn't suit
> > because when it is set, the kernel actually hasn't done any enabling work yet
> > thus TDX is not available albeit the X86_FEATURE_TDX is set.
>
> You define a X86_FEATURE flag. You set it *when* TDX is available and
> enabled. Then you query that flag. This is how synthetic flags work.
>
> In your patchset, when do you know that TDX is enabled? Point me to the
> code place pls.
>
This patchset provides two functions to allow the user of TDX to enable TDX at
runtime when needed: tdx_cpu_enable() and tdx_enable().
Please see patch:
https://lore.kernel.org/lkml/cover.1699527082.git.kai.huang@intel.com/T/#m96cb9aaa4e323d4e29f7ff6c532f7d33a01995a7
So TDX will be available when tdx_enable() is done successfully.
For now KVM is the only user of TDX, and tdx_enable() will be called by KVM on
demand at runtime.
Hope I've made this clear. Thanks.
Powered by blists - more mailing lists