[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e04d07c83b2bae4d89ba6c70d857cdf14cef8387.camel@intel.com>
Date: Tue, 14 Feb 2023 00:09:05 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"Hansen, Dave" <dave.hansen@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "Luck, Tony" <tony.luck@...el.com>,
"david@...hat.com" <david@...hat.com>,
"bagasdotme@...il.com" <bagasdotme@...il.com>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"Wysocki, Rafael J" <rafael.j.wysocki@...el.com>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
"Chatre, Reinette" <reinette.chatre@...el.com>,
"Christopherson,, Sean" <seanjc@...gle.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"Yamahata, Isaku" <isaku.yamahata@...el.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"Shahar, Sagi" <sagis@...gle.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"imammedo@...hat.com" <imammedo@...hat.com>,
"Gao, Chao" <chao.gao@...el.com>,
"Brown, Len" <len.brown@...el.com>,
"sathyanarayanan.kuppuswamy@...ux.intel.com"
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
"Huang, Ying" <ying.huang@...el.com>,
"Williams, Dan J" <dan.j.williams@...el.com>
Subject: Re: [PATCH v9 07/18] x86/virt/tdx: Do TDX module per-cpu
initialization
On Mon, 2023-02-13 at 15:52 -0800, Dave Hansen wrote:
> On 2/13/23 15:43, Huang, Kai wrote:
> > ( My main concern is "Run after the KVM handler" seems a little bit hacky to me.
> > Logically, it's more reasonable to have the TDX callback _before_ KVM's but not
> > _after_. If any user (KVM) has done tdx_enable() successfully, the TDX code
> > should give the user a "TDX-runnable" cpu before user (KVM)'s own callback is
> > involved. Anyway as mentioned above, I'll do above as you suggested.)
>
> I was assuming that the KVM callback is what does VMXON for a given
> logical CPU. If that were the case, you'd need to do the TDX stuff
> *AFTER* VMXON.
>
> Am I wrong?
>
>
You are right.
What I meant was: because we choose to not support VMXON in the (non-KVM)
kernel, we need/have to put TDX's callback after KVM's. Otherwise, perhaps a
better way is to put TDX's callback before KVM's. But maybe it's an arguable
"perhaps", so let's just do TDX's callback after KVM's as you suggested.
Powered by blists - more mailing lists