Skip to contentSkip to conversation

iommu/amd: Check EFR[EPHSup] bit before enabling PPR

PATCH Applied Vasant Hegde 3 participants 3 messages May 30, 2024 – Jun 4, 2024

Subsystems (2)
lore
Share & tools
lore

Vasant Hegde

author maintainer
#0 lore raw

PATCH 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.

---
 drivers/iommu/amd/amd_iommu.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iommu/amd/amd_iommu.h +2 -1
index 2fde1302a584..2d5945c982bd 100644
@@ -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
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · Vasant Hegde

Check for EFR[EPHSup] bit before enabling PPR. This bit must be set to enable PPR.

---
  drivers/iommu/amd/amd_iommu.h | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iommu/amd/amd_iommu.h +0 -0
index 2fde1302a584..2d5945c982bd 100644

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)
maintainer Applied
#2 lore raw
In reply to Vasant Hegde
Quoted 9 lines · Vasant Hegde

Check for EFR[EPHSup] bit before enabling PPR. This bit must be set to enable PPR.

Quoted 3 lines
---
 drivers/iommu/amd/amd_iommu.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.