Re: [RFC PATCH v2 10/23] KVM: TDX: Enable huge page splitting under write kvm->mmu_lock
From: Sagi Shahar
Date: Wed Dec 10 2025 - 12:17:09 EST
On Tue, Dec 9, 2025 at 6:53 PM Yan Zhao <yan.y.zhao@xxxxxxxxx> wrote:
>
> On Tue, Dec 09, 2025 at 06:28:56PM -0600, Sagi Shahar wrote:
> > On Tue, Dec 9, 2025 at 5:54 PM Edgecombe, Rick P
> > <rick.p.edgecombe@xxxxxxxxx> wrote:
> > >
> > > On Tue, 2025-12-09 at 17:49 -0600, Sagi Shahar wrote:
> > > > I was trying to test this code locally (without the DPAMT patches and
> > > > with DPAMT disabled) and saw that sometimes tdh_mem_page_demote
> > > > returns TDX_INTERRUPTED_RESTARTABLE. Looking at the TDX module code
> > > > (version 1.5.16 from [1]) I see that demote and promote are the only
> > > > seamcalls that return TDX_INTERRUPTED_RESTARTABLE so it wasn't handled
> > > > by KVM until now.
> > >
> > > Did you see "Open 3" in the coverletter?
> >
> > I tested the code using TDX module 1.5.24 which is the latest one we
> > got. Is there a newer TDX module that supports this new functionality?
> AFAIK, TDX module 1.5.28 is the earliest version that enumerates
> TDX_FEATURES0.ENHANCED_DEMOTE_INTERRUPTIBILITY (bit 51) and disables
> TDX_INTERRUPTED_RESTARTABLE when there're no L2 TDs. (Please check the
> discussions at [1]).
>
> Looks 1.5.28.04 was just released (internally?), with release note saying
> "Ensure TDH.MEM.PAGE.DEMOTE forward progress for non partitioned TDs".
>
Thanks. I don't have access to the 1.5.28.04 module and we need the
code to work with the 1.5.24 module as well based on our timeline so I
guess we can just add the retries locally for now.
Do you see any issue with retrying the operation in case of
TDX_INTERRUPTED_RESTARTABLE? From what I saw this is not just a
theoretical race but happens every time I try to boot a VM, even for a
small VM with 4 VCPUs and 8GB of memory.
> Not sure if you can check it.
>
> [1] https://lore.kernel.org/all/aRRAFhw11Dwcw7RG@xxxxxxxxxxxxxxxxxxxxxxxxx/
>