diff options
author | Vasant Hegde <vasant.hegde@amd.com> | 2024-10-28 09:38:08 +0000 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2024-10-29 10:08:22 +0100 |
commit | 4402f2627d30c44f56180295e14561f1820eeacc (patch) | |
tree | 42bf3deee99f875921714217a2d31926af746356 /drivers/iommu/amd/init.c | |
parent | ce2cd175469f6cb56e8de9bf87805206c8d19764 (diff) |
iommu/amd: Implement global identity domain
Implement global identity domain. All device groups in identity domain
will share this domain.
In attach device path, based on device capability it will allocate per
device domain ID and GCR3 table. So that it can support SVA.
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20241028093810.5901-11-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd/init.c')
-rw-r--r-- | drivers/iommu/amd/init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 7c883be22559..45fdba48d54d 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -2164,6 +2164,9 @@ static int __init amd_iommu_init_pci(void) struct amd_iommu_pci_seg *pci_seg; int ret; + /* Init global identity domain before registering IOMMU */ + amd_iommu_init_identity_domain(); + for_each_iommu(iommu) { ret = iommu_init_pci(iommu); if (ret) { |