Linux Confidential Computing Development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: "Aneesh Kumar K.V (Arm)" <aneesh.kumar@kernel.org>,
	linux-coco@lists.linux.dev, Jiri Pirko <jiri@resnulli.us>,
	Kevin Tian <kevin.tian@intel.com>,
	Alexey Kardashevskiy <aik@amd.com>,
	Xu Yilun <yilun.xu@linux.intel.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>,
	Rick Edgecombe <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
Subject: Re: [RFC PATCH v1 10/11] virt: coco: arm-cca-host: Publish slot zero and establish streams after acceptance
Date: Thu, 29 Oct 2026 14:10:53 -0300	[thread overview]
Message-ID: <20261029171053.GD3734323@nvidia.com> (raw)
In-Reply-To: <26c24a66-be3d-40ac-8cb4-294deb0108db@intel.com>

On Thu, Oct 29, 2026 at 09:56:26AM -0700, Dave Jiang wrote:
> 
> 
> On 10/28/26 8:26 AM, Aneesh Kumar K.V (Arm) wrote:
> > Declare certificate slot zero as the CCA link backend evidence
> > capability. Limit connect to PDEV creation and slot-zero identity
> > collection. Copy the chain into the PCI evidence cache before publishing
> > the CTLV device.
> > 
> > Complete public-key submission, secure-session setup and stream
> > connection through evidence_accept after userspace verifies the chain.
> > Keep the evidence snapshot separate from the RMM communication cache and
> > release it on context removal.
> > 
> > With AMD converted in the previous patch, CCA is the last link backend
> > that still establishes streams during connect. Now require
> > evidence_accept for every link backend and initialize newly connected
> > contexts without active streams. Reject link providers that omit the
> > callback, and remove the legacy connect-time session and IDE exception
> > from the API comments and documentation. Connect remains required at
> > this point; a later patch allows shared-discovery backends to omit it.
> 
> TDX Connect is another one. The TDX host link [1] sets up the SPDM
> session and then the IDE streams in its connect
> (tdx_tsm_link_connect(), patches 27 and 30).

Yeah, everyone tried to do it this way, but that is what is changing.

Do not call TDH.SPDM.CONNECT when processing the sysfs connect
operation. The sysfs operation only establishes what TSM driver is in
use.

You call TDH.SPDM.CONNECT triggered by attestation subsystem with the
slot id provided by userspace.

Don't get confused by the similar names :)

> It can't defer the session. The TDX Module runs the whole SPDM
> session setup inside TDH.SPDM.CONNECT, and the host relays its DOE
> messages without interpreting them, so there is no defined point to
> stop after the certificates. The chains come back in the device info
> only once TDH.SPDM.CONNECT completes (TDX Connect ABI Reference Spec
> 2.1 v0.66, 4.2.20.1).

Yeah, its fine. TDX will have to do what Aneesh proposed for ARM, and
use use the Rust SPDM Driver to operate DOE prior to calling
TDH.SPDM.CONNECT. This will allow discovering what is in the slots and
passing that information to userspace.

> For TDX, the chain can be checked after connect instead. A connected
> link doesn't make the device trusted by a guest. The guest still
> verifies the device before it accepts it. Could evidence_accept stay
> optional?

No, it is a key part of any crypto handshake, something in userspace
has to acknowledge the SPDM session is "Authenticated" before any use
of it progresses.

For these combined connect and IDE flows, "use" probably means
allowing a kernel driver to bind. Ideally once we connec the TSM there
will be no driver bound, and no driver can be bound until we accept
it.

This probably isn't *strictly* necessary since userspace can sequence
driver binding (assuming that doesn't get removed), more of a safety
sequencing.

For a guest it would mean you are allowed to go to RUN (or maybe it
implicitly goes to run?)

Jason

  reply	other threads:[~2026-10-29 17:11 UTC|newest]

Thread overview: 17+ 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-28 15:26 ` [RFC PATCH v1 02/11] attestation: Filter evidence objects " Aneesh Kumar K.V (Arm)
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-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-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-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 [this message]
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)

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=20261029171053.GD3734323@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=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