From: Xu Yilun <yilun.xu@linux.intel.com>
To: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Cc: "linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"Li, Xiaoyao" <xiaoyao.li@intel.com>,
"Hansen, Dave" <dave.hansen@intel.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"baolu.lu@linux.intel.com" <baolu.lu@linux.intel.com>,
"Hunter, Adrian" <adrian.hunter@intel.com>,
"tony.lindgren@linux.intel.com" <tony.lindgren@linux.intel.com>,
"kas@kernel.org" <kas@kernel.org>,
"Xu, Yilun" <yilun.xu@intel.com>,
"artem.bityutskiy@linux.intel.com"
<artem.bityutskiy@linux.intel.com>,
"nik.borisov@suse.com" <nik.borisov@suse.com>,
"Mehta, Sohil" <sohil.mehta@intel.com>,
"Duan, Zhenzhong" <zhenzhong.duan@intel.com>,
"Gao, Chao" <chao.gao@intel.com>,
"Fang, Peter" <peter.fang@intel.com>,
"Maloor, Kishen" <kishen.maloor@intel.com>
Subject: Re: [PATCH v5 3/6] x86/virt/tdx: Add extra memory to TDX module for the extensions
Date: Thu, 19 Nov 2026 12:50:47 +0800 [thread overview]
Message-ID: <av6AJ4KAPqSco7ma@yilunxu-OptiPlex-7050> (raw)
In-Reply-To: <f9c89d6da82cd737bcb7d72eb6ca5f5bf121be2b.camel@intel.com>
On Wed, Nov 18, 2026 at 10:18:39PM +0000, Edgecombe, Rick P wrote:
> On Wed, 2026-11-11 at 11:48 +0800, Xu Yilun wrote:
> > TDX module extensions need memory for their execution environment to
> > serve SEAMCALL leafs. The TDX architecture implements the extensions
> > in such a way that they use the memory outside of SEAM range, so the
> > kernel should add the memory upfront at initialization time.
> >
> > Introduce a new memory adding process backed by a new SEAMCALL leaf
> > TDH.EXT.MEM.ADD. The kernel queries TDX module how much memory needed,
> > allocates it, adds it to the module, and never gets it back. Note that
> > the process requires Dynamic PAMT backing.
>
> The process requires it, or the memory does?
I'll change to "the memory requires..."
>
> > A subsequent patch adds the
> > support. This doesn't break bisectability cause the extensions can't be
> ^because?
> > enabled yet without a feature that uses them.
>
> Not clear whether the TDX module needs a new feature or the kernel does.
How about:
Note that the memory requires Dynamic PAMT backing, which is supported
via a subsequent patch. This doesn't break bisectability because the
extensions can't be enabled yet until some subsequent kernel change
enables a feature that uses them.
[...]
> > + page = alloc_contig_pages(ext.required_pages, GFP_KERNEL,
> > + numa_mem_id(), &node_online_map);
> > + if (!page) {
> > + ret = -ENOMEM;
> > + goto out_free_hpa_list;
> > + }
> > +
> > + /* Print the amount so users know the cost. */
> > + pr_info("%lu KB allocated for TDX module extensions\n",
> > + ext.required_pages * PAGE_SIZE / 1024);
>
> I wonder if this line is absolutely required for a minimal set?
Yeah I remember the concern is: we enable extensions automatically
because we think people enabling TDX have big servers and won't miss the
memory. But also we print the amount of memory that we use because we
think they will care. They are a bit at odds.
I don't have strong perference, but slightly lean to keeping the print,
so we can keep monitoring how the memory grows, and decide if it's time
to revisit the above "automatically enable whatever is supported" policy.
This print is originally required by Dave [*]. So Dave could you help on
this?
[*]: https://lore.kernel.org/all/62bec236-4716-4326-8342-1863ad8a3f24@intel.com/
next prev parent reply other threads:[~2026-11-19 4:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 3:48 [PATCH v5 0/6] Enable TDX module extensions Xu Yilun
2026-11-11 3:48 ` [PATCH v5 1/6] x86/virt/tdx: Move TDH.SYS.CONFIG operations into a wrapper Xu Yilun
2026-11-13 15:06 ` Nikolay Borisov
2026-11-18 18:51 ` Edgecombe, Rick P
2026-11-19 3:31 ` Xu Yilun
2026-11-11 3:48 ` [PATCH v5 2/6] x86/virt/tdx: Configure add-on features on TDX module init Xu Yilun
2026-11-22 3:50 ` Artem Bityutskiy
2026-11-11 3:48 ` [PATCH v5 3/6] x86/virt/tdx: Add extra memory to TDX module for the extensions Xu Yilun
2026-11-17 3:06 ` Alexey Kardashevskiy
2026-11-18 2:32 ` Xu Yilun
2026-11-18 22:18 ` Edgecombe, Rick P
2026-11-19 4:50 ` Xu Yilun [this message]
2026-11-11 3:48 ` [PATCH v5 4/6] x86/virt/tdx: Support DPAMT when adding memory " Xu Yilun
2026-11-11 3:48 ` [PATCH v5 5/6] x86/virt/tdx: Make TDX module initialize " Xu Yilun
2026-11-13 16:13 ` Nikolay Borisov
2026-11-18 22:44 ` Edgecombe, Rick P
2026-11-19 5:20 ` Xu Yilun
2026-11-11 3:48 ` [PATCH v5 6/6] x86/virt/tdx: Re-initialize the extensions on runtime TDX module update Xu Yilun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=av6AJ4KAPqSco7ma@yilunxu-OptiPlex-7050 \
--to=yilun.xu@linux.intel.com \
--cc=adrian.hunter@intel.com \
--cc=artem.bityutskiy@linux.intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=chao.gao@intel.com \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=kas@kernel.org \
--cc=kishen.maloor@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=nik.borisov@suse.com \
--cc=peter.fang@intel.com \
--cc=rick.p.edgecombe@intel.com \
--cc=sohil.mehta@intel.com \
--cc=tony.lindgren@linux.intel.com \
--cc=x86@kernel.org \
--cc=xiaoyao.li@intel.com \
--cc=yilun.xu@intel.com \
--cc=zhenzhong.duan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®