Re: [PATCH] x86/virt/tdx: Warn on !4K level in tdh_mem_page_aug()
From: Edgecombe, Rick P
Date: Wed Aug 26 2026 - 09:38:19 EST
On Wed, 2026-08-26 at 06:13 -0700, Dave Hansen wrote:
> On 8/26/26 00:23, Yan Zhao wrote:
> > Do not extend the CLFLUSH coverage to make tdh_mem_page_aug() work with
> > huge pages. Not only would this scatter huge page related changes across
> > multiple series, but it also makes little sense to have tdh_mem_page_aug()
> > alone work for huge pages without implementing its counterparts in the
> > unmapping and splitting paths.
>
> For me, it's all about simplicity. It's bad to add *complexity* for
> future functionality because it might not ever get used. But in this
> case, the (Sean-suggested) change is pretty simple. It's more
> complicated to *not* fix the bug and *explain* why it's not being fixed
> than to just fix the dang thing.
We are waiting for some final confirmation that the TDX module will never set
CLFLUSH_BEFORE_ALLOC. And that means all the clflushing is not needed. So I
would probably shortly (weeks) send a patch to rip out any extra flushing added
along with the rest of it.
I think another valid course of action here is to do nothing for now.