iommu/amd: Check EFR[EPHSup] bit before enabling PPR
Subsystems (2)
Vasant Hegde
maintainerPATCH 1/1 iommu/amd: Check EFR[EPHSup] bit before enabling PPR
Check for EFR[EPHSup] bit before enabling PPR. This bit must be set to enable PPR.
Reported-by Borislav Petkov <[email protected]>
Fixes c4cb23111103 ("iommu/amd: Add support for enable/disable IOPF")
Tested-by Borislav Petkov <[email protected]>
Signed-off-by Vasant Hegde <[email protected]>
--- drivers/iommu/amd/amd_iommu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iommu/amd/amd_iommu.h +2 -1
@@ -129,7 +129,8 @@ static inline int check_feature_gpt_level(void)static inline bool amd_iommu_gt_ppr_supported (void ) {return (check_feature (FEATURE_GT ) && -check_feature (FEATURE_PPR )); +check_feature (FEATURE_PPR ) && +check_feature (FEATURE_EPHSUP )); }static inline u64 iommu_virt_to_phys (void *vaddr)
Signature · 1 line
2.31.1
Quoted 18 lines · Vasant Hegde
Check for EFR[EPHSup] bit before enabling PPR. This bit must be set to enable PPR.
Reported-by Borislav Petkov <[email protected]>Fixes c4cb23111103 ("iommu/amd: Add support for enable/disable IOPF")Tested-by Borislav Petkov <[email protected]>Signed-off-by Vasant Hegde <[email protected]>--- drivers/iommu/amd/amd_iommu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/iommu/amd/amd_iommu.h +0
-0
drivers/iommu/amd/amd_iommu.h static inline int check_feature_gpt_level(void) · line 136
Quoted 9 lines
drivers/iommu/amd/amd_iommu.h +2
-1@@ -129,7 +129,8 @@ static inline int check_feature_gpt_level(void)static inline bool amd_iommu_gt_ppr_supported (void ) {return (check_feature (FEATURE_GT ) && -check_feature (FEATURE_PPR )); +check_feature (FEATURE_PPR ) && +check_feature (FEATURE_EPHSUP )); }static inline u64 iommu_virt_to_phys (void *vaddr)
Reviewed-by Suravee Suthikulpanit <[email protected]>
Quoted 9 lines · Vasant Hegde
Check for EFR[EPHSup] bit before enabling PPR. This bit must be set to enable PPR.
Reported-by Borislav Petkov <[email protected]>Fixes c4cb23111103 ("iommu/amd: Add support for enable/disable IOPF")Tested-by Borislav Petkov <[email protected]>Signed-off-by Vasant Hegde <[email protected]>
Quoted 3 lines
--- drivers/iommu/amd/amd_iommu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied, thanks.