iommu/amd: Move V2 page table support check to early_amd_iommu_init()
authorVasant Hegde <vasant.hegde@amd.com>
Mon, 28 Oct 2024 09:38:04 +0000 (09:38 +0000)
committerJoerg Roedel <jroedel@suse.de>
Tue, 29 Oct 2024 09:08:20 +0000 (10:08 +0100)
commitd15f55d645a8d8235593aa888d76a694c73e391c
tree76965dc5b0ffafbf3bedd3c9db370e5a55062ad6
parentb0ffdb23e94fcb30185bc618edf8608a7b0c9dfc
iommu/amd: Move V2 page table support check to early_amd_iommu_init()

amd_iommu_pgtable validation has to be done before calling
iommu_snp_enable(). It can be done immediately after reading IOMMU
features. Hence move this check to early_amd_iommu_init().

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