mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Gao, Chao" <chao.gao@intel.com>,
	"x86@kernel.org" <x86@kernel.org>
Cc: "Van De Ven, Arjan" <arjan.van.de.ven@intel.com>,
	"Xu, Yilun" <yilun.xu@intel.com>, "bp@alien8.de" <bp@alien8.de>,
	"kas@kernel.org" <kas@kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"tglx@kernel.org" <tglx@kernel.org>
Subject: Re: [RFC PATCH v1 0/3] TDX: P-SEAMLDR: Support large TDX modules and sigstructs
Date: Mon, 2 Nov 2026 23:50:36 +0000	[thread overview]
Message-ID: <82be61b9a3f2c12b8e4a804bfa6dc4a0fbe9bd44.camel@intel.com> (raw)
In-Reply-To: <20261030085304.3886520-1-chao.gao@intel.com>

On Fri, 2026-10-30 at 01:52 -0700, Chao Gao wrote:
> This series lets TDX module updates handle large TDX modules and
> sigstructs. It is an RFC for early review.
> 
> Dave, feel free to ignore this RFC for now. TDX developers, please take
> a look.
> 
> I would especially like feedback on one question. Does the kernel need
> to tell userspace that it supports large modules and sigstructs? I would
> rather not add such an interface.
> 
> Userspace can simply try such an image, because a kernel without this
> series rejects it with -EINVAL before calling P-SEAMLDR, so a failed try
> has no side effects. If userspace should not have to try an update to
> find out, the alternative is to backport this series to all kernels that
> support TDX module updates. Userspace could then assume that any kernel
> with TDX module updates handles such images.

Sounds good to me.

> 
> ====
> 
> This series is a follow-up to the TDX module update series. As thanks
> for merging that series, we agreed to take on the TDX metadata cleanup [1].
> With the cleanup converging, we are starting on this work and expect it
> to be merged after the cleanup.
> 
> Today a TDX module binary can be at most 496 pages and its sigstruct at
> most one page. Both limits come from the P-SEAMLDR ABI.
> 
> TDX modules are outgrowing them. A post-quantum signature algorithm
> pushes the sigstruct past 4KB, and new module features push the binary
> past 496 pages. The P-SEAMLDR ABI was extended for both.
> 
> The kernel rejects any image over these limits. TDX modules for Diamond
> Rapids exceed them, so without this series, TDX module updates fail on
> Diamond Rapids. This series is all that is needed to make them work.
> 
> The image format that userspace uploads ('struct tdx_image') is generic
> enough and needs no change.
> 
> == AI Usage ==
> AI was used under supervision to review code and workshop logs. It
> spotted a u32 overflow and an oversized allocation that removing the 496
> page cap would cause in patch 2. The module size limit in that patch
> prevents both. It also suggested renaming init_seamldr_params() in
> patch 1 and updating the comments around it.
> 
> == Testing ==
> Tested on a Diamond Rapids system. Updates with a module larger than 2MB
> and an 8KB sigstruct work, which exercises both the chained page list
> and version 1 of 'struct seamldr_params'. TDs keep running across
> updates.
> 
> [1]: https://lore.kernel.org/kvm/20261012094754.27702-1-chao.gao@intel.com/
> 
> Chao Gao (3):
>   x86/virt/seamldr: Allocate 'struct seamldr_params' after image
>     validation
>   x86/virt/seamldr: Support large TDX module binaries
>   x86/virt/seamldr: Support multiple sigstruct pages
> 
>  arch/x86/virt/vmx/tdx/seamldr.c | 154 ++++++++++++++++++++++++++------
>  1 file changed, 127 insertions(+), 27 deletions(-)

This is a lot bigger than I expected. The old SEAMLDR_PARAMS_VERSION_1 chunk
that got deferred was tiny.

So I guess DMR support takes a bit more.

> 
> 
> base-commit: a49e2d257594931772ab8f0024708c3076f3aa1d


      parent reply	other threads:[~2026-11-02 23:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30  8:52 Chao Gao
2026-10-30  8:52 ` [RFC PATCH v1 1/3] x86/virt/seamldr: Allocate 'struct seamldr_params' after image validation Chao Gao
2026-11-02 23:58   ` Edgecombe, Rick P
2026-11-03  6:30     ` Chao Gao
2026-10-30  8:52 ` [RFC PATCH v1 2/3] x86/virt/seamldr: Support large TDX module binaries Chao Gao
2026-11-03  0:35   ` Edgecombe, Rick P
2026-11-03  8:57     ` Chao Gao
2026-10-30  8:53 ` [RFC PATCH v1 3/3] x86/virt/seamldr: Support multiple sigstruct pages Chao Gao
2026-11-02 23:50 ` Edgecombe, Rick P [this message]

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=82be61b9a3f2c12b8e4a804bfa6dc4a0fbe9bd44.camel@intel.com \
    --to=rick.p.edgecombe@intel.com \
    --cc=arjan.van.de.ven@intel.com \
    --cc=bp@alien8.de \
    --cc=chao.gao@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kas@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    --cc=yilun.xu@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®