Re: [PATCH 5/6] x86/virt/tdx: Make TDX module initialize the extensions

"Edgecombe, Rick P" <[email protected]>
Newsgroups org.kernel.vger.kvm,dev.linux.lists.linux-coco,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, 2026-08-25 at 01:14 +0800, Xu Yilun wrote:
> > What exactly does TDH.EXT.INIT actually do,
> 
> The SPEC just said it "initializes TDX module extension". My
> understanding is that it builds the SEAMCALL execution context by
> setting up its internal data on the memory added by TDH.EXT.MEM.ADD
> 
> > and why can't whatever that is
> > happen during TDH.EXT.MEM.ADD?
> 
> Do you mean why can't the extensions initialization happen on last
> TDH.EXT.MEM.ADD?

Not specifically. Just wondering what it is doing. Like is it the big operation
to prep the memory, and ADD just hands pages which sit on a list waiting the
real work? Or more like a "we think we are good to go" notification from the
VMM?

>  I can think of some case that TDH.EXT.MEM.ADD is not
> needed but the extensions initialization is needed. For example: after
> an compatible TDX module update.
> 
> I may ask the TDX module team to get a better understanding.

That this is also called during an update just raises further questions to me.
If is doing initing of the memory, then what happens during an update? I'd
expect memory would need to be persisted across an update, not initialized. Or
it is doing something different when called after a TDH.SYS.UPDATE? Does it
consume the handoff data?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.