Re: [PATCH v7 7/7] KVM: TDX: Explicitly do WBINVD when no more TDX SEAMCALLs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux