Linux Confidential Computing Development
 help / color / mirror / Atom feed
From: Aneesh Kumar K.V <aneesh.kumar@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Alexey Kardashevskiy <aik@amd.com>,
	linux-coco@lists.linux.dev, Lukas Wunner <lukas@wunner.de>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 1/2] MAINTAINERS: Update TSM file coverage and repository
Date: Mon, 23 Nov 2026 14:53:46 +0530	[thread overview]
Message-ID: <yq5aa4mzrjdp.fsf@kernel.org> (raw)
In-Reply-To: <20261120140412.GW2245175@nvidia.com>

Jason Gunthorpe <jgg@nvidia.com> writes:

> On Fri, Nov 20, 2026 at 05:50:00PM +0530, Aneesh Kumar K.V wrote:
>> Alexey Kardashevskiy <aik@amd.com> writes:
>> 
>> > On 16/11/26 18:54, Aneesh Kumar K.V (Arm) wrote:
>> >> Add drivers/virt/coco/tsm-core.c and git repository to the TSM entry.
>> >> 
>> >> Cc: Alexey Kardashevskiy <aik@amd.com>
>> >> Cc: Jason Gunthorpe <jgg@nvidia.com>
>> >> Cc: Lukas Wunner <lukas@wunner.de>
>> >> Cc: linux-coco@lists.linux.dev
>> >> Signed-off-by: Aneesh Kumar K.V (Arm) <aneesh.kumar@kernel.org>
>> >> ---
>> >>   MAINTAINERS | 2 ++
>> >>   1 file changed, 2 insertions(+)
>> >> 
>> >> diff --git a/MAINTAINERS b/MAINTAINERS
>> >> index ccbcdc0799b9..720fe907885b 100644
>> >> --- a/MAINTAINERS
>> >> +++ b/MAINTAINERS
>> >> @@ -28545,11 +28545,13 @@ M:	Jason Gunthorpe <jgg@nvidia.com>
>> >>   R:	Lukas Wunner <lukas@wunner.de>
>> >>   L:	linux-coco@lists.linux.dev
>> >>   S:	Maintained
>> >> +T:	git git://git.kernel.org/pub/scm/linux/kernel/git/tsm/linux.git
>> >>   F:	Documentation/ABI/testing/configfs-tsm-report
>> >>   F:	Documentation/driver-api/coco/
>> >>   F:	Documentation/driver-api/pci/tsm.rst
>> >>   F:	drivers/pci/tsm.c
>> >>   F:	drivers/virt/coco/guest/
>> >> +F:	drivers/virt/coco/tsm-core.c
>> >>   F:	include/linux/*tsm*.h
>> >>   F:	samples/tsm-mr/
>> >
>> >
>> > I wonder if we can/should also do this now?
>> >
>> > +F:     drivers/crypto/ccp/sev-dev-tsm.c
>> > +F:     drivers/crypto/ccp/sev-dev-tio.*
>> >
>> > Or move the files but where, drivers/attestation/tio?
>> > drivers/attestation/amd? And the same question for ARM/Intel. And do
>> > these drivers/attestation/* become modules? Thoughts? Thanks,
>> 
>> We may want to consider this in the context of the full series. I have a
>> tree that includes attestation, guest_memfd, device trust, and iommufd
>> integration, with the layout below:
>> 
>>  drivers/attestation/cca/guest/spdm.c
>>  drivers/attestation/cca/host/spdm.c
>>  drivers/attestation/cca/host/vdev.c
>>  drivers/attestation/spdm/core.c
>>  drivers/firmware/arm_rmm/da-guest-rhi.c
>>  drivers/firmware/arm_rmm/da-guest.c
>>  drivers/firmware/arm_rmm/da-host-stream.c
>>  drivers/firmware/arm_rmm/da-host-vdev.c
>>  drivers/firmware/arm_rmm/da-host.c
>>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-realm.c
>>  drivers/vfio/pci/vfio_pci_gmem.c
>>  drivers/vfio/pci/vfio_pci_gmem.h
>>  .../coco/{arm-cca-guest => arm-cca/guest}/main.c
>>  drivers/virt/coco/arm-cca/guest/rsi-da.h
>>  drivers/virt/coco/arm-cca/host/main.c
>>  drivers/virt/coco/arm-cca/host/rmi-da.c
>>  drivers/virt/coco/arm-cca/host/rmi-da.h
>>  drivers/virt/coco/arm-cca/host/viommu.c
>>  drivers/virt/coco/arm-cca/pci/guest-pci.c
>>  drivers/virt/coco/arm-cca/pci/host-pci.c
>
> It seems okay, though I wonder what pci/host&guest-pci.c is?
>


The host side handles:

1. Allocating the Root Port PDEV.
2. Allocating IDE resources for an external endpoint.
3. Connecting the firmware stream and enabling IDE.
4. Using a system stream for an RcIEP, without Root Port or PCI IDE resources.
5. Marking PF0 ready for device assignment only after setup succeeds.

The guest side handles:

1. Preventing PCI driver attachment.
2. Comparing the current RSI device information with the report and creating MMIO descriptors from it.
3. Validating the mappings.
4. Requesting RUN and marking the device as accepted.


Most of these are driven during evidence-accept, so the module
dependencies are (based on lsmod):

Host:
  arm-cca-host.ko
    +--> attestation-cca-host.ko
    |      +--> arm-cca-host-pci.ko
    |      |      `--> arm-rmm-da-host.ko
    |      +--> arm-rmm-da-host.ko
    |      +--> attestation-spdm.ko
    |      `--> attestation.ko
    +--> arm-cca-host-pci.ko
    +--> arm-rmm-da-host.ko
    +--> attestation-spdm.ko
    `--> attestation.ko

Realm guest:
  arm-cca-guest.ko
    +--> attestation-cca-guest.ko
    |      +--> arm-cca-guest-pci.ko
    |      |      `--> arm-rmm-da-guest.ko
    |      +--> arm-rmm-da-guest.ko
    |      +--> attestation-spdm.ko
    |      `--> attestation.ko
    +--> arm-cca-guest-pci.ko
    +--> arm-rmm-da-guest.ko
    `--> tsm_report.ko


Common attestation dependencies:

  attestation-spdm.ko
    +--> attestation.ko
    |      `--> ctlv.ko
    `--> ctlv.ko


>
> I kind of wish we had a directory called tsm too..
>
> drivers/firmware/tsm/ 
>
> Maybe?
>
> Can you be consistent with the cca/arm_rmm/arm-cca naming?
>

Will name it arm_cca ? 

>
> arm_rmm seems reasonable to me, the host tsm doesn't have to be used
> with VMs.

-aneesh

      reply	other threads:[~2026-11-23  9:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  7:54 [PATCH 1/2] MAINTAINERS: Update TSM file coverage and repository Aneesh Kumar K.V (Arm)
2026-11-16  7:54 ` [PATCH 2/2] PCI/TSM: Move core code into its own directory Aneesh Kumar K.V (Arm)
2026-11-16 13:00   ` Jason Gunthorpe
2026-11-16 13:15     ` Aneesh Kumar K.V
2026-11-16 13:19       ` Jason Gunthorpe
2026-11-16 14:34         ` Aneesh Kumar K.V
2026-11-16 14:42           ` Jason Gunthorpe
2026-11-18  7:40             ` Aneesh Kumar K.V
2026-11-18 13:14               ` Jason Gunthorpe
2026-11-18  8:44 ` [PATCH 1/2] MAINTAINERS: Update TSM file coverage and repository Alexey Kardashevskiy
2026-11-18 12:55   ` Jason Gunthorpe
2026-11-20 12:20   ` Aneesh Kumar K.V
2026-11-20 14:04     ` Jason Gunthorpe
2026-11-23  9:23       ` Aneesh Kumar K.V [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=yq5aa4mzrjdp.fsf@kernel.org \
    --to=aneesh.kumar@kernel.org \
    --cc=aik@amd.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=jgg@nvidia.com \
    --cc=linux-coco@lists.linux.dev \
    --cc=lukas@wunner.de \
    --cc=thomas.lendacky@amd.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