Re: [PATCH 1/2] x86/virt/tdx: Drop tdx_clflush_*()

From: Tony Lindgren

Date: Thu Sep 24 2026 - 00:45:12 EST


On Wed, Sep 23, 2026 at 03:50:10PM +0000, Edgecombe, Rick P wrote:
> On Wed, 2026-09-23 at 10:47 +0300, Tony Lindgren wrote:
> > On Tue, Sep 22, 2026 at 01:52:14PM -0700, Rick Edgecombe wrote:
> > > In practice this bit has never been set by any TDX module, so flushing
> > > is unneeded. Going forward the TDX docs will be updated to clarify that
> > > CLFLUSH_BEFORE_ALLOC will never be set in any future TDX module either.
> >
> > Should there be a separate patch first before these two patches to bail
> > out if the TDX module TDX_FEATURES0 CLFLUSH_BEFORE_ALLOC bit is ever set?
> >
> > Then dropping the related code would be safe to do without having to
> > ponder if it's safe to do.
>
> Eh, I don't think we need it. If docs are updated to say TDX will never set it,
> then we would really be sanity checking the TDX module specs. Doesn't seem worth
> the code.

OK. Maybe just say this bit has never been set for a TDX module to make it
clear. The "in practice" gave me an iffy feeling if it's safe to do.