[PATCH v10 00/18] iommufd: TSM-backed virtual IOMMUs for confidential guests
Aneesh Kumar K.V
aneesh.kumar at kernel.org
Thu Dec 3 05:14:51 PST 2026
Aneesh Kumar K.V <aneesh.kumar at kernel.org> writes:
> "Tian, Kevin" <kevin.tian at intel.com> writes:
>
>>> From: Aneesh Kumar K.V (Arm) <aneesh.kumar at kernel.org>
>>> Sent: Wednesday, November 25, 2026 4:11 PM
>>>
>>> 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:
>>>
>>> https://git.gitlab.arm.com/linux-arm/linux-cca.git
>>> branch: cca/topics/7.4/cca-da-integration-v2
>>>
>>> Notes:
>>> * Codex was used to assist with commit message formatting and code
>>> rearrangement.
>>>
>>> Changes from v9:
>>> https://lore.kernel.org/all/20261116081935.85372-1-
>>> aneesh.kumar at kernel.org
>>> * Split the PCI/TSM get/put helpers from removal of the legacy bind/unbind
>>> interface.
>>> * Split the TSM lookup/reference helpers from their IOMMUFD
>>> callers
>>> * Replace allocated PCI/TSM contexts with get/put helpers that update the
>>> DSM user count on PF0. Remove unused context accessors and
>>> pci_tsm_is_configured().
>>> * Add a tagged union for the physical IOMMU and TSM pointers in a
>>> vIOMMU.
>>>
>>
>> I think this is respun too quickly. As Jason pointed out there are many dependencies
>> here, so it's still far from landing. It would be better to allow more time between
>> versions to ensure receiving as much feedback as possible from key stakeholders
>> (Jason, Alexey, etc.)
>>
>
> One reason for the quick respin was to accommodate feedback from related
> discussions in other threads. The last two patches and their locking
> will be simplified further based on:
>
> https://patch.msgid.link/20261123083337.2731019-9-aneesh.kumar@kernel.org
>
> So you can skip reviewing those patches for now.
>
To elaborate, with the changes I have ready, PF0 removal retries the
disconnect until dsm_context_users reaches zero. While waiting, it drops
pci_tsm_rwsem and waits on the tsm_dev::disconnect_wait wait queue. This
allows pci_dsm_context_put() to release assignment references and wake
the waiter. PF0 removal therefore waits for the disconnect to complete.
TSM unregistration disconnects all DSMs using the same checks and
wait/retry mechanism. Once they are disconnected, it drops the initial
user reference taken during tsm_register() and waits for a completion
while the remaining users, such as vIOMMUs, release their references.
This considerably simplifies the last two patches. Based on your earlier
feedback, I will wait another week before sending these changes?
-aneesh
More information about the linux-arm-kernel
mailing list