]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/amd: Separate page table setup from domain allocation
authorVasant Hegde <vasant.hegde@amd.com>
Mon, 28 Oct 2024 09:38:05 +0000 (09:38 +0000)
committerJoerg Roedel <jroedel@suse.de>
Tue, 29 Oct 2024 09:08:21 +0000 (10:08 +0100)
commitb3c989083dabab472eb766d59b1d1fb9f11495d6
tree8838d62e970d3e4a361fedb93ab6ca99f04ca5f7
parentd15f55d645a8d8235593aa888d76a694c73e391c
iommu/amd: Separate page table setup from domain allocation

Currently protection_domain_alloc() allocates domain and also sets up
page table. Page table setup is required for PAGING domain only. Domain
type like SVA doesn't need page table. Hence move page table setup code
to separate function.

Also SVA domain allocation path does not call pdom_setup_pgtable().
Hence remove IOMMU_DOMAIN_SVA type check.

Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Jacob Pan <jacob.pan@linux.microsoft.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20241028093810.5901-8-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/iommu.c