[PATCH v10 06/18] iommufd/device: Associate KVM file pointer with iommufd_device
Baolu Lu
baolu.lu at linux.intel.com
Wed Dec 2 18:07:26 PST 2026
On 11/25/2026 4:11 PM, Aneesh Kumar K.V (Arm) wrote:
> From: Shameer Kolothum<shameerali.kolothum.thodi at huawei.com>
>
> TSM vDevice support needs access to the KVM associated with a VFIO device
> after the device has been bound to iommufd.
>
> Extend iommufd_device_bind() to accept the device's KVM file and store it
> in the iommufd_device. The KVM file reference is owned by VFIO and is
> already held for the duration of the device open path.
>
> Reviewed-by: Kevin Tian<kevin.tian at intel.com>
> Reviewed-by: Jason Gunthorpe<jgg at nvidia.com>
> Signed-off-by: Shameer Kolothum<shameerali.kolothum.thodi at huawei.com>
> [nicolinc: fix build error in iommufd_test_mock_domain()]
> Signed-off-by: Nicolin Chen<nicolinc at nvidia.com>
> [aneesh.kumar: Switch to use kvm_file]
> Cc: Jason Gunthorpe<jgg at ziepe.ca>
> Cc: Kevin Tian<kevin.tian at intel.com>
> Cc: Joerg Roedel<joro at 8bytes.org>
> Cc: Will Deacon<will at kernel.org>
> Cc: Robin Murphy<robin.murphy at arm.com>
> Cc: Alex Williamson<alex at shazbot.org>
> Cc:iommu at lists.linux.dev
> Signed-off-by: Aneesh Kumar K.V (Arm)<aneesh.kumar at kernel.org>
> ---
> drivers/iommu/iommufd/device.c | 7 ++++++-
> drivers/iommu/iommufd/iommufd_private.h | 2 ++
> drivers/iommu/iommufd/selftest.c | 2 +-
> drivers/vfio/iommufd.c | 3 ++-
> include/linux/iommufd.h | 4 +++-
> 5 files changed, 14 insertions(+), 4 deletions(-)
Reviewed-by: Lu Baolu <baolu.lu at linux.intel.com>
More information about the linux-arm-kernel
mailing list