[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a578e3b5-9fd3-4f69-943f-9415f4047e19@intel.com>
Date: Tue, 26 Aug 2025 10:18:17 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Sean Christopherson <seanjc@...gle.com>, Kai Huang <kai.huang@...el.com>
Cc: bp@...en8.de, tglx@...utronix.de, peterz@...radead.org, mingo@...hat.com,
hpa@...or.com, thomas.lendacky@....com, x86@...nel.org, kas@...nel.org,
rick.p.edgecombe@...el.com, dwmw@...zon.co.uk, linux-kernel@...r.kernel.org,
pbonzini@...hat.com, kvm@...r.kernel.org, reinette.chatre@...el.com,
isaku.yamahata@...el.com, dan.j.williams@...el.com, ashish.kalra@....com,
nik.borisov@...e.com, chao.gao@...el.com, sagis@...gle.com,
farrah.chen@...el.com, Binbin Wu <binbin.wu@...ux.intel.com>
Subject: Re: [PATCH v7 7/7] KVM: TDX: Explicitly do WBINVD when no more TDX
SEAMCALLs
On 8/26/25 10:10, Sean Christopherson wrote:
>> +void tdx_cpu_flush_cache_for_kexec(void)
>> +{
>> + lockdep_assert_preemption_disabled();
>> +
>> + if (!this_cpu_read(cache_state_incoherent))
>> + return;
>> +
> Can you add a comment here to explain why this is done even if the kernel doesn't
> support kexec? I've no objection to the superfluous flushing, but I've spent far
> too much time deciphering old commits where the changelog says one thing and the
> code does something else with no explanation. I don't want to be party to such
> crimes 🙂
You mean as opposed to #ifdef'ing it out?
Looking at the code again, I completely agree in concept. The connection
between TDX, kexec and 'cache_state_incoherent' is totally opaque.
Powered by blists - more mailing lists