Re: [PATCH 3/6] x86/virt/tdx: Detect if the extensions initialization is required

"Edgecombe, Rick P" <[email protected]>
Newsgroups dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Fri, 2026-08-21 at 16:22 +0100, Kiryl Shutsemau wrote:
> On Fri, Aug 21, 2026 at 11:29:17AM +0800, Xu Yilun wrote:
> >   static __init int init_tdx_module(void)
> >   {
> >   	int ret;
> > @@ -1229,6 +1253,10 @@ static __init int init_tdx_module(void)
> >   	if (ret)
> >   		goto err_reset_pamts;
> >   
> > +	ret = init_tdx_module_extensions();
> > +	if (ret)
> > +		goto err_reset_pamts;
> > +
> 
> Hm. Don't we need TDH.SYS.SHUTDOWN/DISABLE on error?
> 
> Once TDMRs are initialized the module is functional. Yanking PAMT from
> under it is not safe AFAICS.

If we reset all the memory, how is it different than bailing halfway when
initializing the TDMRs? Some special state changes after the last TDMR is
inited?
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.