Re: [PATCH v2 2/5] x86/virt/tdx: Pull kexec cache flush logic into arch/x86
From: Edgecombe, Rick P
Date: Tue Mar 31 2026 - 18:23:19 EST
On Tue, 2026-03-31 at 12:22 -0700, Sean Christopherson wrote:
> > -
> > -#ifdef CONFIG_KEXEC_CORE
> > -void tdx_cpu_flush_cache_for_kexec(void)
> > -{
> > - lockdep_assert_preemption_disabled();
>
> Is there a pre-existing bug here that gets propagate to tdx_shutdown_cpu()?
> When called from kvm_offline_cpu(), preemption won't be fully disabled, but
> per-CPU access are fine because the task is pinned to the target CPU.
>
> See https://lore.kernel.org/all/aUVx20ZRjOzKgKqy@xxxxxxxxxx
Yes. And actually it got hit during development of this series. This patch will
conflict with the fix:
https://lore.kernel.org/lkml/20260312100009.924136-1-kai.huang@xxxxxxxxx/
Oh, you acked it actually. But I was under the impression that after this patch
here, the splat wouldn't be triggered. So it inadvertently fixes it. But that
other patch is much more backport friendly.