Re: [PATCH 11/24] iommu/amd: Export amd_iommu_alloc_dev_data() helper
From: Jason Gunthorpe
Date: Mon Aug 24 2026 - 13:29:05 EST
On Mon, 27 Jul 2026 13:29:00 +0000, Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx> wrote:
> AMD vIOMMU requires programming the DTE of the IOMMU device ID to set up
> IPA mapping, and current DTE helper functions (for setting / clearing)
> require struct iommu_dev_data.
>
> However, the IOMMU device does not go through the normal PCI device attach
> path, which would allocate the struct iommu_dev_data. So, the driver needs
> to manually allocate and initialize the struct iommu_dev_data for IOMMU
> in order to reuse the helper functions.
>
> [...]
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
--
Jason