[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6097c0afdffd714e4a6aa349dfc7f9a009e2718f.camel@intel.com>
Date: Tue, 26 Apr 2022 11:55:46 +1200
From: Kai Huang <kai.huang@...el.com>
To: Sathyanarayanan Kuppuswamy
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Cc: seanjc@...gle.com, pbonzini@...hat.com, dave.hansen@...el.com,
len.brown@...el.com, tony.luck@...el.com,
rafael.j.wysocki@...el.com, reinette.chatre@...el.com,
dan.j.williams@...el.com, peterz@...radead.org, ak@...ux.intel.com,
kirill.shutemov@...ux.intel.com, isaku.yamahata@...el.com
Subject: Re: [PATCH v3 08/21] x86/virt/tdx: Do logical-cpu scope TDX module
initialization
On Sat, 2022-04-23 at 18:27 -0700, Sathyanarayanan Kuppuswamy wrote:
>
> On 4/5/22 9:49 PM, Kai Huang wrote:
> > Logical-cpu scope initialization requires calling TDH.SYS.LP.INIT on all
> > BIOS-enabled cpus, otherwise the TDH.SYS.CONFIG SEAMCALL will fail.
>
> IIUC, this change handles logical CPU initialization part of TDX module
> initialization. So why talk about TDH.SYS.CONFIG failure here? Are they
> related?
They are a little bit related but I think I can remove it. Thanks.
>
> > TDH.SYS.LP.INIT can be called concurrently on all cpus.
>
> IMO, if you move the following paragraph to the beginning, it is easier
> to understand "what" and "why" part of this change.
OK.
> >
> > Following global initialization, do the logical-cpu scope initialization
> > by calling TDH.SYS.LP.INIT on all online cpus. Whether all BIOS-enabled
> > cpus are online is not checked here for simplicity. The caller of
> > tdx_init() should guarantee all BIOS-enabled cpus are online.
>
> Include specification reference for TDX module initialization and
> TDH.SYS.LP.INIT.
>
> In TDX module spec, section 22.2.35 (TDH.SYS.LP.INIT Leaf), mentions
> some environment requirements. I don't see you checking here for it?
> Is this already met?
>
Good catch. I missed it, and I'll look into it. Thanks.
--
Thanks,
-Kai
Powered by blists - more mailing lists