iommu/amd: Use protection_domain.flags to check page table mode
authorVasant Hegde <vasant.hegde@amd.com>
Mon, 5 Feb 2024 11:56:04 +0000 (11:56 +0000)
committerJoerg Roedel <jroedel@suse.de>
Fri, 9 Feb 2024 12:16:24 +0000 (13:16 +0100)
commit7b4e5623d8e4f1475b7deac42035d0129fb36ed0
treeac0e284ea933d66f455e0b77cb5c6190771c365c
parentb7731065523048276a80c8e16120208153438930
iommu/amd: Use protection_domain.flags to check page table mode

Page table mode (v1, v2 or pt) is per domain property. Recently we have
enhanced protection_domain.pd_mode to track per domain page table mode.
Use that variable to check the page table mode instead of global
'amd_iommu_pgtable' in {map/unmap}_pages path.

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