From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796020353; b=gX81kuCBqW53298PmrStBdl0/JFmwAqstuFzQFVtOUCpsXAOCt/hoBMo/PzVg+9eJltz hazqoCcK+aQ1+SeMmkzdgnW8o+wVHYqoFVXkrkOlF28aroCm4XYSqhLzpgGBEf8FSRgGa jVi8mpAraUA3gHxFg21eUHOeJMqfvzXkxFJZI+DYP9JkaBEvauP9BjrBvizvcL8RhCEd0 O0s6a8uiGUJImE58U8yiRsdyOSWFeHHszMmp0q4VwbOrEIKuqnj6o3QrxuJ6otl/Ss6pc 9uWkuVNypOZR/1TaRxhQVILL3L13rj9Qavpe9sQkdS4mXRw0Kczz5/Crzkm/eTwBo5Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796020353; h=Received:DKIM-Signature:X-Mailer:From:To:Cc:Subject:In-Reply-To: References:Date:Message-ID:MIME-Version:Content-Type; bh=r9Wvyc+7OOPiSWpTcIRs1yMwQ6J4mSCqmQHwianhI74=; b=Ug4M3z7WneAR6MRAMQ2Oc8wBc4o0W9M0HyIoN6PbgpaANgv5AiXQ6groo27Xl4TpSyIk 0QwCGijNVlNzMv8LL82C7inbnijTLGuD3yEi7ElDKDPzWVnzVaTmWvOiM4+Jss99rbq07 bMi2iaAvr9iO3VpYd9/oFhGLy2t61+rOeDZnmfDT765aD0EgRMHCle/Lzt5qVvi+E6KHt /S53mYEd/232QFeQ9l4SYG1KrsZLeshgCGelN6dqw48tg4ZVQzS0kQRBa1v0rI5/Mx8un ITsZEP5x+lGSPow+7qAbqcjtVnOoh9XQ4nC7NkSwEaXSnX+qo5QCIbDKUz6I7Wg9dkw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YSjSf4lf; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14968606B1F7; Mon, 30 Nov 2026 06:32:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YSjSf4lf Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C4761F0092C; Mon, 30 Nov 2026 06:32:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796020352; bh=r9Wvyc+7OOPiSWpTcIRs1yMwQ6J4mSCqmQHwianhI74=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=YSjSf4lfm+woTMSQNt44Ksn3Yuq/TowsOv6+829qy4Z3Q8kAMjGSV2HzzyC0Qb5kd BMUw9APAe38+BlO3ztsv82sVdiwDhDX25Cxr7++DqxX9LFPlmW5Agz+4ZC5E+ldpfP liOxXA8ir1PpMAknX++CEOWb/74Aj07ob6ck7oVnHGQylkbsOnuWZlTkjqZ/2x+lc7 Y+WiNOCzOwH9/esakwJp2znx9ulIlCku5hboJif5NNyfciW/qLb5goQkumlU7neN8y KbKSEHSgXcDHMo7KqUKfBIhDKDt7IxFpwlDErQRaOdGCal+AwRKIvakgrJNGlvjWPd Co6saKzu0stqg== X-Mailer: emacs 31.1 (via feedmail 11-beta-1 I) From: Aneesh Kumar K.V To: Jason Gunthorpe Cc: linux-coco@lists.linux.dev, Dan Williams , Leon Romanovsky , Bjorn Helgaas , Jonathan Cameron , Xu Yilun , Alexey Kardashevskiy , Greg Kroah-Hartman , "Rafael J . Wysocki" , Steven Price , Suzuki K Poulose , Lukas Wunner , Ashish Kalra , Tom Lendacky , Herbert Xu , driver-core@lists.linux.dev, linux-pci@vger.kernel.org, kvm@vger.kernel.org, patches@lists.linux.dev Subject: Re: [PATCH v1 08/10] PCI/TSM: Add sysfs lock and unlock for guest-assigned devices In-Reply-To: <20261125143021.GE246011@ziepe.ca> References: <20261123083337.2731019-1-aneesh.kumar@kernel.org> <20261123083337.2731019-9-aneesh.kumar@kernel.org> <20261123152738.GF179082@ziepe.ca> <20261125143021.GE246011@ziepe.ca> Date: Mon, 30 Nov 2026 12:02:22 +0530 Message-ID: X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain Jason Gunthorpe writes: > On Wed, Nov 25, 2026 at 02:33:26PM +0530, Aneesh Kumar K.V wrote: >> Jason Gunthorpe writes: >> [ ... 96 lines skipped ... ] >> https://git.gitlab.arm.com/linux-arm/linux-cca/-/blob/cca/topics/7.4/cca-da-integration-v2/Documentation/userspace-api/attestation-spdm.rst?ref_type=heads > > I don't think the scheme will be 'spdm-get' using a bunch of 'cached' > object IDs. It should be much more specific. > > The transcript should be its own top level API, with its own sequence > numbered list of discrete blobs. > Could you clarify what you mean by a sequence-numbered list of discrete blobs? The transcript format could accommodate additional SPDM requests and responses as firmware starts exporting them. Each transcript-get would return all messages captured so far, in capture order. For current RMM firmware, the available VCA messages are: M0 = GET_VERSION M1 = VERSION M2 = GET_CAPABILITIES M3 = CAPABILITIES M4 = NEGOTIATE_ALGORITHMS M5 = ALGORITHMS Each Mn contains the original SPDM header and message payload. RMM provides these through successive communication calls, identifying the offset and length of each request or response buffer. We would need additional metadata, such as the length of each message, whether it is a request or response, and, for future extensions, whether it was transmitted within a secure session. Linux could add this metadata as a header: RMM cache notifications: [M0], [M1], [M2], [M3], [M4], [M5] Host transcript-get output: [H0][M0][H1][M1][H2][M2]...[H5][M5] Since this representation preserves capture order and message boundaries, I am wondering why we would need sequence-number in transcript-get ? Or do you want explicit sequence numbers so that userspace can request individual records or only messages appended since an earlier read? Or by sequence number do you mean the SPDM session ID to be included? For the guest, we would preserve the existing raw VCA representation over RHI. The VMM would remove the Linux headers before returning it: RHI VCA object returned to the guest: [M0][M1][M2][M3][M4][M5] Guest transcript-get output: [H0][M0][H1][M1][H2][M2]...[H5][M5] The guest would verify the raw VCA against the digest provided through RSI. There is also a question about subsequent evidence collection. Should transcript-get include the GET_MEASUREMENTS exchanges initiated by evidence-get? Current RMM exports the complete GET_MEASUREMENTS request and its MEASUREMENTS response, including the signature. We could represent those as transcript entries without changing RMM. However, doing so would require transcript-get to cache those exchanges, while we also discussed not caching any of them. Finally, what should evidence-get return on the host? Current CCA host firmware provides the certificate chain and VCA during authentication, but offers no additional fresh evidence collection. If certificate-get and transcript-get return those captures, does that mean evidence-get is not required on the host? Without evidence-get, how do we identify the evidence instance being accepted by evidence-accept? My patches implemented evidence-get as returning a bundle containing all available verification inputs, including the certificate chain and transcript, together with freshly collected evidence where supported. The patch set returned the device generation and a receipt with the bundle: # evidence-get, 1 fragment, generation 0 evidence-get details evidence-details.device-generation 2 evidence-details.receipt hex:27be43bc8c299eca3205e59c3f36ffdc54e2b3e5563320daaabe423ab11bbf09 evidence-get results evidence-get results.vendor-format spdm-bundle evidence-get results.length 872 Userspace supplied both values to evidence-accept. The generation identified the attempt (spdm-start of the session), while the receipt identified the delivered evidence set. A later evidence-get would invalidate the previous receipt. This allows the kernel to check which delivered evidence set userspace is accepting. Could we retain that flow on the host even when nothing can be refreshed? The guest would use the same flow, with evidence-get also requesting fresh measurements using the supplied nonce and fetching the interface report. Under that model, transcript-get would be optional inspection API. evidence-get would return the available verification inputs together, and evidence-accept would identify that result using the generation and receipt. Is that consistent with the split you have in mind? -aneesh