[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAhR5DGPF3AV22kQ4ZVNWh3Og=oiJiaDRgBL5feB6C-AHb=apA@mail.gmail.com>
Date: Wed, 10 Dec 2025 11:16:23 -0600
From: Sagi Shahar <sagis@...gle.com>
To: Yan Zhao <yan.y.zhao@...el.com>
Cc: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>, "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"quic_eberman@...cinc.com" <quic_eberman@...cinc.com>, "Li, Xiaoyao" <xiaoyao.li@...el.com>,
"Du, Fan" <fan.du@...el.com>, "Hansen, Dave" <dave.hansen@...el.com>,
"david@...hat.com" <david@...hat.com>, "thomas.lendacky@....com" <thomas.lendacky@....com>,
"tabba@...gle.com" <tabba@...gle.com>, "vbabka@...e.cz" <vbabka@...e.cz>,
"michael.roth@....com" <michael.roth@....com>, "seanjc@...gle.com" <seanjc@...gle.com>,
"Weiny, Ira" <ira.weiny@...el.com>, "kas@...nel.org" <kas@...nel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>, "ackerleytng@...gle.com" <ackerleytng@...gle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"binbin.wu@...ux.intel.com" <binbin.wu@...ux.intel.com>, "Yamahata, Isaku" <isaku.yamahata@...el.com>,
"Peng, Chao P" <chao.p.peng@...el.com>, "zhiquan1.li@...el.com" <zhiquan1.li@...el.com>,
"Annapurve, Vishal" <vannapurve@...gle.com>, "Miao, Jun" <jun.miao@...el.com>,
"x86@...nel.org" <x86@...nel.org>, "pgonda@...gle.com" <pgonda@...gle.com>
Subject: Re: [RFC PATCH v2 10/23] KVM: TDX: Enable huge page splitting under
write kvm->mmu_lock
On Tue, Dec 9, 2025 at 6:53 PM Yan Zhao <yan.y.zhao@...el.com> 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@...el.com> 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@yzhao56-desk.sh.intel.com/
>
Powered by blists - more mailing lists