[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABgObfZSKoT5xLm9XUR9wweU2MgXj4xww1irL8KZRBUze3vDFw@mail.gmail.com>
Date: Wed, 20 Aug 2025 22:35:03 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: "Huang, Kai" <kai.huang@...el.com>
Cc: "seanjc@...gle.com" <seanjc@...gle.com>, "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"ashish.kalra@....com" <ashish.kalra@....com>, "Hansen, Dave" <dave.hansen@...el.com>,
"thomas.lendacky@....com" <thomas.lendacky@....com>, "kas@...nel.org" <kas@...nel.org>,
"Chatre, Reinette" <reinette.chatre@...el.com>, "dwmw@...zon.co.uk" <dwmw@...zon.co.uk>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "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>, "sagis@...gle.com" <sagis@...gle.com>,
"Chen, Farrah" <farrah.chen@...el.com>, "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>,
"bp@...en8.de" <bp@...en8.de>, "binbin.wu@...ux.intel.com" <binbin.wu@...ux.intel.com>,
"Gao, Chao" <chao.gao@...el.com>, "Williams, Dan J" <dan.j.williams@...el.com>,
"x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH v6 7/7] KVM: TDX: Explicitly do WBINVD when no more TDX SEAMCALLs
On Wed, Aug 20, 2025 at 1:22 PM Huang, Kai <kai.huang@...el.com> wrote:
> I think one minor issue here is, when CONFIG_INTEL_TDX_HOST is off but
> CONFIG_KEXEC_CORE is on, there will be no implementation of
> tdx_cpu_flush_cache_for_kexec(). This won't result in build error,
> though, because when TDX_HOST is off, KVM_INTEL_TDX will be off too, i.e.,
> there won't be any caller of tdx_cpu_flush_cache_for_kexec().
>
> But this still doesn't look nice?
Why do you need one? It's called tdx_cpu_flush_cache_for_kexec(), you
don't need it if TDX is disabled.
> Btw, the above will provide the stub function when both KEXEC_CORE and
> TDX_HOST is off, which seems to be a step back too?
Let's just stop here. Are we really wasting this much time discussing
like 30 characters and 0 bytes of object code?
> To me, it's more straightforward to just rename it to
> tdx_cpu_flush_cache_for_kexec() and remove the stub:
Sure, just rename the function and let's call it a day. If it was me,
v6 was good enough.
Paolo
Powered by blists - more mailing lists