[PATCH v10 10/18] PCI/TSM: Add helpers to prevent disconnect while in use
Tian, Kevin
kevin.tian at intel.com
Wed Dec 2 22:12:15 PST 2026
> From: Aneesh Kumar K.V (Arm) <aneesh.kumar at kernel.org>
> Sent: Wednesday, November 25, 2026 4:11 PM
>
> Add PCI TEE Security Manager (TSM) helpers that prevent PF0 disconnect
> while a function is in use. Validate the function's TSM association and
> increment PF0's dsm_context_users count on get. Find PF0 through the
> same function and decrement the count on put. Reject disconnect with
> -EBUSY until all users have released it.
'context' is confusing here. what about 'link_users" as the real purpose
is to reject link disconnect when the count is positive?
then the related helpers can be renamed:
pci_tsm_context_get/put() -> pci_tsm_link_get/put()
>
> The caller must prevent removal of the function between get and put, for
> example by keeping its VFIO device open. No per-call allocation is
> needed.
closing the VFIO device doesn't remove the pci device.
not sure what 'per-call allocation' means here.
More information about the linux-arm-kernel
mailing list