From: Xu Yilun <yilun.xu@linux.intel.com>
To: x86@kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: kas@kernel.org, rick.p.edgecombe@intel.com,
yilun.xu@linux.intel.com, yilun.xu@intel.com,
xiaoyao.li@intel.com, sohil.mehta@intel.com,
adrian.hunter@intel.com, kishen.maloor@intel.com,
tony.lindgren@linux.intel.com, peter.fang@intel.com,
baolu.lu@linux.intel.com, zhenzhong.duan@intel.com,
chao.gao@intel.com, artem.bityutskiy@linux.intel.com,
kvm@vger.kernel.org
Subject: [PATCH 0/6] Enable TDX module extensions
Date: Fri, 21 Aug 2026 11:29:14 +0800 [thread overview]
Message-ID: <20260821032920.256225-1-yilun.xu@linux.intel.com> (raw)
We are trying to get detailed review and some acks for this series.
Dave please feel free to ignore. Kiryl, Rick and TDX developers, please
help take a look.
== Why it's split out ==
The extension patches are pre-requisite for several TDX features (DICE,
TDISP, TD migration). We would appreciate community review and ack so
that all of the extension-based work can build on it.
Previously this series had been posted along with DICE [1]. But now it
is split. It was confusing review to have them together and DICE needs
more time to implement feedback.
The DICE part is in the full branch [2] as an example for extensions.
But it does not include the other DICE feedbacks.
[1] https://lore.kernel.org/lkml/20260618081355.3253581-1-yilun.xu@linux.intel.com/
[2] https://github.com/intel-staging/tdx/tree/tdx-module-ext
This series retained Reviewed-by tags collected in DICE series. Please
let me know if you object.
== Branch stack ==
This is based on v7.2-rc1, the full branch contains:
Patch 1: SEAMCALL version patch [3] which is WIP on community review.
Patch 2~8: This series, including this cover-letter.
Patch 9~N: The old DICE part as an example.
[3] https://lore.kernel.org/all/20260722084634.131020-1-yilun.xu@linux.intel.com/
== Overview ==
To date, SEAMCALL execution must complete quickly to avoid stalling the
host, or yield quickly at pre-defined interrupt checkpoints. This is
acceptable for the existing SEAMCALL leaves, which perform simple,
bounded operations.
However, some new features such as attestation and TD migration require
higher level security protocols inside the TDX module, which cannot fit
within that constraint. TDX solves this by making those operations
inherently preemptible and resumable like OS tasks. TDX provides a
separate SEAMCALL execution environment - the TDX module extensions -
for those operations.
This capability allows for higher-level SEAMCALL ABI design - like
"create a DICE-based quote". Several new features, such as DICE-based
quoting, TDISP and TD migration, use SEAMCALL leaves backed by the TDX
module extensions.
The TDX module extensions need memory for their own internal state and
data to serve these SEAMCALL leaves, so they need extra setup during TDX
module initialization. At runtime, the host invokes these SEAMCALL
leaves just as normal ones - if interrupted, simply re-invoke the leaf
to resume.
For more information on TDX module extensions, please refer to [4].
[4] https://lore.kernel.org/lkml/20260618081355.3253581-1-yilun.xu@linux.intel.com/
== Changes ==
Dave pointed out the SEAMCALL version change could be a separate
discussion. Split the patch out from this series.
Chao asked if the extensions re-initialization flow could be simplified
by unconditionally executing TDH.EXT.INIT and leaving the validity check
to the module. Yilun pointed out that if we don't honor the updated
metadata, the SEAMCALL leaf may fail then the entire update fails. Rick
pointed out if an update results in different metadata for the
extensions, it is an incompatible update so the update failure is
expected. We agreed on this, so now the simplified re-initialization
flow is: execute TDH.EXT.INIT unless the extensions were originally not
required at boot time. This also moves the extensions' metadata back to
tdx_sys_info, as they now read at boot time and never updated afterward.
Another comment is that Xiaoyao and Rick pointed out the interruptible
resumable capability provided by the extensions is not new. From the
host perspective, some existing SEAMCALL leaves can save states, return
from interrupt and resume. So I no longer emphasize that the new
SEAMCALL leaves are new type of resumable calls. Instead I explained the
yielding details in TDX module to justify why TDX module extensions are
needed.
Rick pointed out the selection of SEAMCALL leaf version for
TDH.SYS.CONFIG is the TDX ABI detail, mixing the operation with other
kernel operations makes the version selection logic tenuous. Make a new
patch which adds SEAMCALL helpers for TDH.SYS.CONFIG/UPDATE.
Quoting v2: https://lore.kernel.org/lkml/20260618081355.3253581-1-yilun.xu@linux.intel.com/
Quoting v1: https://lore.kernel.org/all/20260522034128.3144354-1-yilun.xu@linux.intel.com/
Xu Yilun (6):
x86/virt/tdx: Wrap TDH.SYS.CONFIG/UPDATE operations in helpers
x86/virt/tdx: Configure add-on features on TDX module init and update
x86/virt/tdx: Detect if the extensions initialization is required
x86/virt/tdx: Add extra memory to TDX module for the extensions
x86/virt/tdx: Make TDX module initialize the extensions
x86/virt/tdx: Re-initialize the extensions on runtime TDX module
update
arch/x86/include/asm/tdx.h | 1 +
arch/x86/include/asm/tdx_global_metadata.h | 6 +
arch/x86/virt/vmx/tdx/tdx.h | 2 +
arch/x86/virt/vmx/tdx/tdx.c | 245 +++++++++++++++++++-
arch/x86/virt/vmx/tdx/tdx_global_metadata.c | 20 ++
5 files changed, 265 insertions(+), 9 deletions(-)
base-commit: d8610a4dbc62cf5ddf24ad10ba7a7324c0abb278
--
2.25.1
next reply other threads:[~2026-08-21 3:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 3:29 Xu Yilun [this message]
2026-08-21 3:29 ` [PATCH 1/6] x86/virt/tdx: Wrap TDH.SYS.CONFIG/UPDATE operations in helpers Xu Yilun
2026-08-21 3:29 ` [PATCH 2/6] x86/virt/tdx: Configure add-on features on TDX module init and update Xu Yilun
2026-08-21 3:29 ` [PATCH 3/6] x86/virt/tdx: Detect if the extensions initialization is required Xu Yilun
2026-08-21 3:29 ` [PATCH 4/6] x86/virt/tdx: Add extra memory to TDX module for the extensions Xu Yilun
2026-08-21 3:29 ` [PATCH 5/6] x86/virt/tdx: Make TDX module initialize " Xu Yilun
2026-08-21 3:29 ` [PATCH 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=20260821032920.256225-1-yilun.xu@linux.intel.com \
--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=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=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