Re: [PATCH 2/2] x86/virt/tdx: Drop tdh_phymem_page_wbinvd_*()
From: Xiaoyao Li
Date: Mon Oct 12 2026 - 08:58:59 EST
On 9/24/2026 12:31 AM, Edgecombe, Rick P wrote:
> On Wed, 2026-09-23 at 10:18 +0800, Xiaoyao Li wrote:
>> What about TDH.PHYMEM.CACHE.WB? Can it be dropped as well?
>
> Apparently not. I'm not sure we can't push harder on it to drop that that too,
> but it had a slightly different reason for existing apparently. There is a
> different flag for it "SKIP_PHYMEM_CACHE_WB" which we don't check.
>
> Since it isn't needed for huge page code reduction, I think it's not a
> priority.
I agree.
> Do you think it is worth mentioning here? Since it has a separate enumeration, I
> thought it was separate enough to keep the log simpler. Keeping it down to what
> is need to understand and not more.
I asked because I don't think TDX spec clarifies it clearly why it needs a
separate enumeration bit.
My understanding is that, for runtime removing a TDX private page, host VMM
calls TDH.PHYMEM.PAGE.WBINVD on a page after removing the page from the SEPT.
For removing pages at TD teardown phase, host VMM can do it in a batch by
TDH.PHYMEM.CACHE.WB to write back all the pages so that host VMM doesn't need to
call TDH.PHYMEM.PAGE.WBINVD on each page.
If the page wbinvd is not needed for runtime page removal, it seems not needed
for teardown time as well.
Considering it helps nothing to huge page code reduction, I'm OK to leave it to
another topic. Maybe we can mention this consideration in the cover letter and
explained that TDH.PHYMEM.CACHE.WB can be discussed and handled separately?