Linux Confidential Computing Development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: "Reshetova, Elena" <elena.reshetova@intel.com>
Cc: Xu Yilun <yilun.xu@linux.intel.com>,
	"Jiang, Dave" <dave.jiang@intel.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
	"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
	Jiri Pirko <jiri@resnulli.us>,
	"Tian, Kevin" <kevin.tian@intel.com>,
	Alexey Kardashevskiy <aik@amd.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Steven Price <steven.price@arm.com>,
	Kiryl Shutsemau <kas@kernel.org>,
	"Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Ashish Kalra <ashish.kalra@amd.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	John Allen <john.allen@amd.com>, Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	"patches@lists.linux.dev" <patches@lists.linux.dev>
Subject: Re: [RFC PATCH v1 10/11] virt: coco: arm-cca-host: Publish slot zero and establish streams after acceptance
Date: Wed, 4 Nov 2026 09:41:19 -0400	[thread overview]
Message-ID: <20261104134119.GR274202@nvidia.com> (raw)
In-Reply-To: <DS4PPFA84FA90FCDC94900C2FC6CEF4D428E7682@DS4PPFA84FA90FC.namprd11.prod.outlook.com>

On Wed, Nov 04, 2026 at 09:49:25AM +0000, Reshetova, Elena wrote:
> > > We will need some multi-step sequence from the uABI perspective:
> > >
> > > 1) CTLV command START CONNECT:
> > >     TSM does:
> > >      GET_VERSION / VERSION                          (VCA: Version)
> > >      GET_CAPABILITIES / CAPABILITIES                (VCA: Capabilities)
> > >      NEGOTIATE_ALGORITHMS / ALGORITHMS              (VCA: Algorithms)
> > >      GET_DIGESTS / DIGESTS
> > >
> 
> Why do you need a break here? Why not merge 1 and 2? 

Break gives the option for the OS to ask the TSM to transfer the
certificates it actually wants to speed up session startup. Eg if the
OS already has all the certificates cached then it doesn't need to
fetch any. Or if it only wants to use slot 0 then it only needs to
fetch slot 0.

> > > 2) CTLV commands:
> > >     query certificates. TSM will issue on demand:
> > >      GET_CERTIFICATE / CERTIFICATE                  (every slot in the slot mask, all chunks)
> > >     query VCA items

With the paus we can drive the certificate fetch from userspace, on
demand.

I view it as optional. The TSM's implementation choice is invisible to
userspace, but I'd like to gently encourage that we think about
session startup performance :)

> > > Then there are five implementations of this:
> > >  a) Today w/ 1.2 and current TDX/RMM/SEV specs:
> > >       #1 is a NOP
> > >       #2 is EOPNOTSUPP
> > >       #3 does the full flow from GET_VERSION -> FINISH
> > >          no GET_DIGESTS
> > >       #4 returns only the slot S certificate that was signed
> > >          during the transcript
> 
> Again, agree given the current limitations. 
> 
> > 
> > I see Elena's proposal [*] for current TDX:
> > 
> >   #1 Does the full flow from GET_VERSION -> FINISH
> >      no GET_DIGESTS
> >   #2 Returns only the slot S certificate that was signed during the
> >      transcript, this is my understanding, not specified by Elena.
> >   #3 If user selects slot0, pass; other slots, fail. Actually user can
> >      see only slot0.
> >   #4 Same as #2
> > 
> > Seems same to me, any preference? or do I understand correctly?

I think it is similar, but the main drawback is that userspace can no
longer detect that it is running option a. From userspace it looks
like option b with the device having only a single slot since this
makes #2 return certificates instead of EOPNOTSUPP.

Further, we completely loose the ability for userspace to specify a
slot at all since #3 would be the only function accepting a slot
number, but the session is already open.

Thus I think it is better to stick with the a above where all flows
consistently issue KEY_EXCHANGE in step #3. IMHO that consistency is
easier to reason about across all the options.

From a definitional perspective I would be very happy if the uAPI
specified precisely what part of the SPDM sequence is performed at
each step.

Again, if userspace detects it is in option a and really wants to do
slot selection it can run through iterations of step #3 to enumerate
the slots. I don't see we need the kernel to be involved in this, and
that is a strong reason why option a should be discoverable.

> > >   b) Improved 1.2 TSM:
> > >       #1 TSM can execute GET_DIGESTS and pause after
> > >       #2 Ideal TSM allows the OS to request each GET_CERTIFICATES command.
> > >          Less ideal is TSM pushes all GET_CERTIFICATES then pauses.
> 
> Why is it less ideal ? 

Only performance. It means every SPDM setup is forced to transfer
every certificate bundle even if we don't care or already have
it. That's all.

> > >       #3 TSM issues CHALLENGE and verifiers the signature.
> > >
> > >   c) 1.3 Multi-key flow:
> > >       #1/#2 is the same as b
> > >
> > >       #3 The function of CHALLENGE is absorbed in the updated
> > >          KEY_EXCHANGE which covers GET_DIGESTS when in multikey mode
> > > 	 No CHALLENGE issued
> > >
> > >   d) RustSPDM flow:
> > >       #1 becomes a RustSPDM session and includes CHALLENGE
> > >       #3 starts a new session
> > >       We have to solve the issue with ALGORITHMS mismatch somehow.
> > >       There is no verifiable binding of certificates visible to the
> > >       verifier
> 
> But why we need the RustSPDM flow now given that we agree we 
> should handle everything in single SPDM TSM session?

Right, I'm showing it for completness, I don't think we should
implement this. Maybe if someone strenuously objects to implement the
FW changes for mulit-slot/multi-key in their TSM they would do this.

My feeling is for now we should sketch out option a/b/c in detail,
everyone should confirm they can implement option a with current TSM
specs. Everyone should go back to their arch teams and reflect if they
agree to option c in future as some discoverable extension in their
FW.

Agree?

Is there a PDF for TDX's SPDM flow someplace? I will try to draft a
more complete document

Jason

  reply	other threads:[~2026-11-04 13:41 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 15:26 [RFC PATCH v1 00/11] PCI/TSM: Add CTLV attestation Aneesh Kumar K.V (Arm)
2026-10-28 15:26 ` [RFC PATCH v1 01/11] attestation: Restrict inherited operations per instance Aneesh Kumar K.V (Arm)
2026-10-30 13:29   ` Jiri Pirko
2026-10-28 15:26 ` [RFC PATCH v1 02/11] attestation: Filter evidence objects " Aneesh Kumar K.V (Arm)
2026-10-30 13:44   ` Jiri Pirko
2026-10-31  6:24     ` Aneesh Kumar K.V
2026-11-02 19:14       ` Jiri Pirko
2026-10-28 15:26 ` [RFC PATCH v1 03/11] attestation: Enter secure operation when evidence is accepted Aneesh Kumar K.V (Arm)
2026-10-30 13:51   ` Jiri Pirko
2026-10-30 15:36     ` Jason Gunthorpe
2026-10-31  4:09     ` Aneesh Kumar K.V
2026-11-02 11:28       ` Jiri Pirko
2026-10-28 15:26 ` [RFC PATCH v1 04/11] attestation: Bind object selection to accepted evidence snapshots Aneesh Kumar K.V (Arm)
2026-10-28 15:26 ` [RFC PATCH v1 05/11] attestation: Make the evidence-get challenge attribute optional Aneesh Kumar K.V (Arm)
2026-10-28 15:26 ` [RFC PATCH v1 06/11] PCI/TSM: Describe the PCI attestation control family Aneesh Kumar K.V (Arm)
2026-10-30 14:01   ` Jiri Pirko
2026-10-30 15:43     ` Jason Gunthorpe
2026-11-02 12:45       ` Jiri Pirko
2026-11-03 15:45         ` Jason Gunthorpe
2026-11-04  9:21           ` Jiri Pirko
2026-11-04 14:00             ` Jason Gunthorpe
2026-10-31  4:05     ` Aneesh Kumar K.V
2026-11-02 11:50       ` Jiri Pirko
2026-11-03 15:35       ` Jason Gunthorpe
2026-10-31  4:22     ` Aneesh Kumar K.V
2026-11-02 11:30       ` Jiri Pirko
2026-11-03 15:39       ` Jason Gunthorpe
2026-10-28 15:26 ` [RFC PATCH v1 07/11] attestation: Add attestation helpers for PCI/TSM integration Aneesh Kumar K.V (Arm)
2026-10-28 15:26 ` [RFC PATCH v1 08/11] PCI/TSM: Bind CTLV attestation to connected and locked contexts Aneesh Kumar K.V (Arm)
2026-10-28 22:56   ` Dave Jiang
2026-10-29  5:30     ` Aneesh Kumar K.V
2026-10-29 12:41       ` Jason Gunthorpe
2026-10-30 14:04   ` Jiri Pirko
2026-10-30 14:08   ` Jiri Pirko
2026-10-30 15:39     ` Jason Gunthorpe
2026-11-02 12:11       ` Jiri Pirko
2026-11-03 15:41         ` Jason Gunthorpe
2026-10-28 15:26 ` [RFC PATCH v1 09/11] crypto/ccp: Defer SEV-TIO link setup until evidence acceptance Aneesh Kumar K.V (Arm)
2026-10-28 15:26 ` [RFC PATCH v1 10/11] virt: coco: arm-cca-host: Publish slot zero and establish streams after acceptance Aneesh Kumar K.V (Arm)
2026-10-29 16:56   ` Dave Jiang
2026-10-29 17:10     ` Jason Gunthorpe
2026-10-30  9:58       ` Reshetova, Elena
2026-10-30 13:15         ` Jason Gunthorpe
2026-10-31  3:47           ` Aneesh Kumar K.V
2026-11-02 10:11             ` Reshetova, Elena
2026-11-02 17:26               ` Jason Gunthorpe
2026-11-03 12:01                 ` Reshetova, Elena
2026-11-03 15:16                   ` Jason Gunthorpe
2026-11-04  8:03                     ` Xu Yilun
2026-11-04  9:49                       ` Reshetova, Elena
2026-11-04 13:41                         ` Jason Gunthorpe [this message]
2026-11-04 16:54                           ` Dave Jiang
2026-11-04  9:03                     ` Reshetova, Elena
2026-11-04 13:48                       ` Jason Gunthorpe
2026-11-03 16:31                 ` Aneesh Kumar K.V
2026-11-03 17:56                   ` Jason Gunthorpe
2026-11-02 10:05           ` Reshetova, Elena
2026-11-02 10:22           ` Reshetova, Elena
2026-11-02 17:37             ` Jason Gunthorpe
2026-10-28 15:26 ` [RFC PATCH v1 11/11] virt: coco: arm-cca-guest: Refresh selected evidence against trusted digests Aneesh Kumar K.V (Arm)
2026-10-30 12:34 ` [RFC PATCH v1 00/11] PCI/TSM: Add CTLV attestation Xu Yilun
2026-10-30 15:32   ` Jason Gunthorpe

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=20261104134119.GR274202@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=aik@amd.com \
    --cc=aneesh.kumar@kernel.org \
    --cc=ashish.kalra@amd.com \
    --cc=bhelgaas@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dave.jiang@intel.com \
    --cc=elena.reshetova@intel.com \
    --cc=jic23@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=john.allen@amd.com \
    --cc=kas@kernel.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-coco@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=patches@lists.linux.dev \
    --cc=rick.p.edgecombe@intel.com \
    --cc=steven.price@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=thomas.lendacky@amd.com \
    --cc=will@kernel.org \
    --cc=yilun.xu@linux.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