diff options
| author | Suravee Suthikulpanit <[email protected]> | 2023-09-21 09:21:41 +0000 |
|---|---|---|
| committer | Joerg Roedel <[email protected]> | 2023-09-25 10:39:03 +0000 |
| commit | 7b7563a93437ef945c829538da28f0095f1603ec (patch) | |
| tree | 91b5bcf1ca72bbcc1663267c6e8b05ce35bbda6a /tools/testing/selftests/bpf/prog_tests/autoload.c | |
| parent | iommu/amd: Miscellaneous clean up when free domain (diff) | |
| download | kernel-7b7563a93437ef945c829538da28f0095f1603ec.tar.gz kernel-7b7563a93437ef945c829538da28f0095f1603ec.zip | |
iommu/amd: Consolidate feature detection and reporting logic
Currently, IOMMU driver assumes capabilities on all IOMMU instances to be
homogeneous. During early_amd_iommu_init(), the driver probes all IVHD
blocks and do sanity check to make sure that only features common among all
IOMMU instances are supported. This is tracked in the global amd_iommu_efr
and amd_iommu_efr2, which should be used whenever the driver need to check
hardware capabilities.
Therefore, introduce check_feature() and check_feature2(), and modify
the driver to adopt the new helper functions.
In addition, clean up the print_iommu_info() to avoid reporting redundant
EFR/EFR2 for each IOMMU instance.
Signed-off-by: Suravee Suthikulpanit <[email protected]>
Signed-off-by: Vasant Hegde <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Reviewed-by: Jerry Snitselaar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions
