Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@amd.com>
To: "Aneesh Kumar K.V (Arm)" <aneesh.kumar@kernel.org>,
	linux-coco@lists.linux.dev
Cc: Alex Williamson <alex@shazbot.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Jacob Pan <jacob.pan@linux.microsoft.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Joerg Roedel <joro@8bytes.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Kevin Tian <kevin.tian@intel.com>,
	Krishna Reddy <vdumpa@nvidia.com>, Lukas Wunner <lukas@wunner.de>,
	Nicolin Chen <nicolinc@nvidia.com>,
	Robin Murphy <robin.murphy@arm.com>,
	Samuel Ortiz <sameo@rivosinc.com>,
	Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
	Steven Price <steven.price@arm.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Thierry Reding <thierry.reding@kernel.org>,
	Vasant Hegde <vasant.hegde@amd.com>,
	Will Deacon <will@kernel.org>,
	Xu Yilun <yilun.xu@linux.intel.com>,
	Ashish Kalra <ashish.kalra@amd.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	iommu@lists.linux.dev,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org,
	patches@lists.linux.dev
Subject: Re: [PATCH v9 00/13] iommufd: TSM-backed virtual IOMMUs for confidential guests
Date: Mon, 23 Nov 2026 17:40:48 +1100	[thread overview]
Message-ID: <3573001a-24b8-49f3-97c8-7a414c88deb4@amd.com> (raw)
In-Reply-To: <20261116081935.85372-1-aneesh.kumar@kernel.org>

On 16/11/26 19:19, Aneesh Kumar K.V (Arm) wrote:
> This series adds IOMMUFD and PCI/TSM infrastructure for assigning PCI
> devices to confidential guests. A TEE Security Manager (TSM) can provide a
> virtual IOMMU (vIOMMU), and an IOMMUFD vDEVICE object represents a physical
> device within that virtual IOMMU.
> 
> The series adds a common framework for operations on vDEVICE objects and
> updates lifetime management to keep the VM and device-security resources
> available while those objects are in use.
> 
> The Arm CCA backend is provided in a separate series, together with
> operations for TEE Device Interface Security Protocol (TDISP) state changes
> and access to cached device-attestation objects.
> 
> The full series, including the Arm CCA backend, is available at:

nah, it is not :(

> 
>    https://git.gitlab.arm.com/linux-arm/linux-cca.git cca/topics/7.4/tdisp-host-rc3
> 
> Notes:
> * Codex was used to assist with commit message formatting and code
>    rearrangement.
> 
> Changes from v8:
> https://lore.kernel.org/all/20261104161632.3547423-1-aneesh.kumar@kernel.org
> * Drop the patch taking an additional KVM file reference for the
>    iommufd_device lifetime.
> * Rename the IOMMU_VDEVICE_OP reserved field to __reserved and return
>    -EOPNOTSUPP when it is nonzero. Keep the ioctl table entries ordered.
> * Collect Reviewed-by tags.
> * Address review feedback.
> 
> Changes from v7:
> https://lore.kernel.org/all/20261008055955.4014342-1-aneesh.kumar@kernel.org
> * Replace IOMMU_VDEVICE_TSM_REQ with the common IOMMU_VDEVICE_OP ioctl
>    framework. Keep operation definitions and callbacks in the Arm CCA
>    backend series.
> * Replace architecture-specific request dispatch, TSM result codes and
>    buffer-residue returns with operation-specific request/response formats,
>    a zero-success return convention and resp_len for response lengths.
> * Hold a KVM file reference for the full iommufd_device lifetime and
>    require matching device/vIOMMU KVM associations for vDEVICE allocation.
> * Hold TSM device and user references as well as the backend module
>    reference for the vIOMMU lifetime. Make unregister reject new users
>    and wait for existing users before tearing down PCI connections.
> * Coordinate DSM removal with TSM unregister so the completion used to
>    wait for users remains valid throughout teardown.
> * Complete PCI registration before publishing the TSM device and roll
>    back PCI registration if publication fails. Require PCI operations
>    when registering a TSM.
> * Move PCI/TSM core code into drivers/pci/tsm/core.c.
> * Temporarily disable AMD vIOMMU allocation while its interfaces are updated.
> 
> Changes from v6:
> https://lore.kernel.org/all/20260917140159.1163281-1-aneesh.kumar@kernel.org
> * Replace the IOMMUFD provider registry with per-device TSM operation lookup.
> * Move vIOMMU allocation size and initialization into the selected vIOMMU ops.
> * Select parent HWPT policy from the vIOMMU ops flags.
> * Pin a vIOMMU's TSM backend module through vIOMMU destruction.
> 
> Changes from v5:
> https://lore.kernel.org/all/20260525154816.1029642-1-aneesh.kumar@kernel.org
> * Replace the TSM bind/unbind interface with reference-counted contexts.
> * Add the IOMMUFD vIOMMU provider abstraction.
> * Route TSM guest requests through vIOMMU ops.
> 
> Changes from v4:
> https://lore.kernel.org/all/20260427061005.901854-1-aneesh.kumar@kernel.org
> * Switch VFIO/iommufd to use struct file *kvm_file instead of relying on
>    kvm->users_count references.
> * Define TSM request scope values globally in iommufd.
> * Rename the ioctl to IOMMU_VDEVICE_TSM_REQ.
> * Address other review feedback.
> 
> Changes from v2:
> https://lore.kernel.org/all/20260309111704.2330479-1-aneesh.kumar@kernel.org
> * Bump the series revision to v4 to keep it in sync with the dependent CCA DA
>    patchsets. There was no v3 posting.
> * Drop [PATCH v2 1/3] iommufd/viommu: Allow associating a KVM VM fd with a
>    vIOMMU
> * Add two new patches to associate a struct kvm * with iommufd objects:
>    iommufd/device: Associate a kvm pointer to iommufd_device
>    iommufd/viommu: Associate a kvm pointer to iommufd_viommu
> * Address review feedback
> 
> Changes from v1:
> https://lore.kernel.org/all/20250728135216.48084-8-aneesh.kumar@kernel.org
> * Rebase onto the latest kernel
> * Address review feedback
> * Drop the TSM map ioctl; the KVM prefault patch will be used instead to
>    ensure that private memory is preallocated
> 
> 
> Cc: Alex Williamson <alex@shazbot.org>
> Cc: Alexey Kardashevskiy <aik@amd.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> CC: Jacob Pan <jacob.pan@linux.microsoft.com>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: Joerg Roedel <joro@8bytes.org>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Jonathan Hunter <jonathanh@nvidia.com>
> Cc: Kevin Tian <kevin.tian@intel.com>
> Cc: Krishna Reddy <vdumpa@nvidia.com>
> Cc: Lukas Wunner <lukas@wunner.de>
> Cc: Nicolin Chen <nicolinc@nvidia.com>
> Cc: Robin Murphy <robin.murphy@arm.com>
> Cc: Samuel Ortiz <sameo@rivosinc.com>
> Cc: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
> Cc: Steven Price <steven.price@arm.com>
> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: Thierry Reding <thierry.reding@kernel.org>
> Cc: Vasant Hegde <vasant.hegde@amd.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Xu Yilun <yilun.xu@linux.intel.com>
> Cc: Ashish Kalra <ashish.kalra@amd.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: iommu@lists.linux.dev
> Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Cc: kvm@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-coco@lists.linux.dev
> Cc: linux-pci@vger.kernel.org
> Cc: linux-tegra@vger.kernel.org
> Cc: patches@lists.linux.dev
> 
> Aneesh Kumar K.V (Arm) (11):
>    virt: coco: tsm: Require PCI operations when registering a TSM
>    virt: coco: tsm: Remove the device from lookup before PCI teardown
>    virt: coco: tsm: Complete PCI registration before publishing the
>      device
>    iommufd: Add a vDEVICE operation ioctl framework
>    PCI/TSM: Remove the legacy guest request interface
>    PCI/TSM: Keep connections active while device contexts exist
>    iommufd/viommu: Select vIOMMU operations before allocation
>    iommufd/viommu: Allow PCI TSM backends to provide vIOMMU operations
>    iommufd/viommu: Allow vIOMMUs without a parent HWPT
>    PCI/TSM: Wait for device contexts before removing a DSM
>    PCI/TSM: Wait for users during unregister
> 
> Nicolin Chen (1):
>    iommufd/viommu: Keep a reference to the KVM file
> 
> Shameer Kolothum (1):
>    iommufd/device: Associate KVM file pointer with iommufd_device
> 
>   Documentation/ABI/testing/sysfs-bus-pci       |  15 +-
>   Documentation/userspace-api/iommufd.rst       |  44 +-
>   drivers/crypto/ccp/sev-dev-tsm.c              |   4 +-
>   drivers/iommu/amd/iommu.c                     |   3 +-
>   drivers/iommu/amd/iommufd.c                   |  18 +-
>   drivers/iommu/amd/iommufd.h                   |  11 +-
>   drivers/iommu/amd/nested.c                    |   4 +-
>   .../arm/arm-smmu-v3/arm-smmu-v3-iommufd.c     |  37 +-
>   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c   |   7 +-
>   drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h   |  16 +-
>   .../iommu/arm/arm-smmu-v3/tegra241-cmdqv.c    |  24 +-
>   drivers/iommu/iommufd/device.c                |   7 +-
>   drivers/iommu/iommufd/hw_pagetable.c          |  14 +-
>   drivers/iommu/iommufd/iommufd_private.h       |   3 +
>   drivers/iommu/iommufd/main.c                  |   3 +
>   drivers/iommu/iommufd/selftest.c              |  33 +-
>   drivers/iommu/iommufd/viommu.c                | 155 ++++--
>   drivers/pci/tsm/core.c                        | 448 ++++++++++--------
>   drivers/vfio/iommufd.c                        |   3 +-
>   drivers/virt/coco/tsm-core.c                  | 213 +++++++--
>   include/linux/iommu.h                         |  20 +-
>   include/linux/iommufd.h                       |  29 +-
>   include/linux/pci-tsm.h                       | 154 +++---
>   include/linux/tsm.h                           |  41 +-
>   include/uapi/linux/iommufd.h                  |  36 +-
>   25 files changed, 880 insertions(+), 462 deletions(-)
> 
> 
> base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3

This is v7.4-rc3.

> prerequisite-patch-id: 121492d71cc22b2adbfdedd668868c5a449ad764
> prerequisite-patch-id: ed31fd728f0adba3d60dcd6f3bae8da1a2193bcc

What are these two? Cannot find them any tree... I really want try this all but also trying to eliminate guessing...

Thanks,

-- 
Alexey


      parent reply	other threads:[~2026-11-23  6:41 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  8:19 [PATCH v9 00/13] iommufd: TSM-backed virtual IOMMUs for confidential guests Aneesh Kumar K.V (Arm)
2026-11-16  8:19 ` [PATCH v9 01/13] virt: coco: tsm: Require PCI operations when registering a TSM Aneesh Kumar K.V (Arm)
2026-11-19  7:18   ` Baolu Lu
2026-11-16  8:19 ` [PATCH v9 02/13] virt: coco: tsm: Remove the device from lookup before PCI teardown Aneesh Kumar K.V (Arm)
2026-11-18  6:43   ` Xu Yilun
2026-11-24  3:57     ` Aneesh Kumar K.V
2026-11-16  8:19 ` [PATCH v9 03/13] virt: coco: tsm: Complete PCI registration before publishing the device Aneesh Kumar K.V (Arm)
2026-11-18  7:11   ` Xu Yilun
2026-11-16  8:19 ` [PATCH v9 04/13] iommufd/device: Associate KVM file pointer with iommufd_device Aneesh Kumar K.V (Arm)
2026-11-19  8:13   ` Baolu Lu
2026-11-24  4:01     ` Aneesh Kumar K.V
2026-11-16  8:19 ` [PATCH v9 05/13] iommufd/viommu: Keep a reference to the KVM file Aneesh Kumar K.V (Arm)
2026-11-19  8:20   ` Baolu Lu
2026-11-16  8:19 ` [PATCH v9 06/13] iommufd: Add a vDEVICE operation ioctl framework Aneesh Kumar K.V (Arm)
2026-11-20  1:17   ` Baolu Lu
2026-11-16  8:19 ` [PATCH v9 07/13] PCI/TSM: Remove the legacy guest request interface Aneesh Kumar K.V (Arm)
2026-11-20  1:37   ` Baolu Lu
2026-11-16  8:19 ` [PATCH v9 08/13] PCI/TSM: Keep connections active while device contexts exist Aneesh Kumar K.V (Arm)
2026-11-20  2:58   ` Baolu Lu
2026-11-24  4:03     ` Aneesh Kumar K.V
2026-11-16  8:19 ` [PATCH v9 09/13] iommufd/viommu: Select vIOMMU operations before allocation Aneesh Kumar K.V (Arm)
2026-11-20  4:44   ` Baolu Lu
2026-11-20 17:42   ` Jacob Pan
2026-11-20 18:34     ` Jason Gunthorpe
2026-11-24  4:12     ` Aneesh Kumar K.V
2026-11-16  8:19 ` [PATCH v9 10/13] iommufd/viommu: Allow PCI TSM backends to provide vIOMMU operations Aneesh Kumar K.V (Arm)
2026-11-19 19:50   ` Jacob Pan
2026-11-24  4:21     ` Aneesh Kumar K.V
2026-11-20  5:39   ` Baolu Lu
2026-11-16  8:19 ` [PATCH v9 11/13] iommufd/viommu: Allow vIOMMUs without a parent HWPT Aneesh Kumar K.V (Arm)
2026-11-20  6:49   ` Baolu Lu
2026-11-16  8:19 ` [PATCH v9 12/13] PCI/TSM: Wait for device contexts before removing a DSM Aneesh Kumar K.V (Arm)
2026-11-16  8:19 ` [PATCH v9 13/13] PCI/TSM: Wait for users during unregister Aneesh Kumar K.V (Arm)
2026-11-23  6:40 ` Alexey Kardashevskiy [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=3573001a-24b8-49f3-97c8-7a414c88deb4@amd.com \
    --to=aik@amd.com \
    --cc=alex@shazbot.org \
    --cc=aneesh.kumar@kernel.org \
    --cc=ashish.kalra@amd.com \
    --cc=bhelgaas@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=iommu@lists.linux.dev \
    --cc=jacob.pan@linux.microsoft.com \
    --cc=jgg@ziepe.ca \
    --cc=jic23@kernel.org \
    --cc=jonathan.cameron@huawei.com \
    --cc=jonathanh@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=nicolinc@nvidia.com \
    --cc=patches@lists.linux.dev \
    --cc=robin.murphy@arm.com \
    --cc=sameo@rivosinc.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=steven.price@arm.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=suzuki.poulose@arm.com \
    --cc=thierry.reding@kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=vasant.hegde@amd.com \
    --cc=vdumpa@nvidia.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