Linux IOMMU Development
 help / color / mirror / Atom feed
* [PATCH rc] iommu/amd: Check EFR[EPHSup] bit before enabling PPR
@ 2024-05-30  7:11 Vasant Hegde
  2024-05-30  8:23 ` Suthikulpanit, Suravee
  2024-06-04 12:00 ` Joerg Roedel
  0 siblings, 2 replies; 3+ messages in thread
From: Vasant Hegde @ 2024-05-30  7:11 UTC (permalink / raw)
  To: iommu, joro
  Cc: suravee.suthikulpanit, Vasant Hegde, Borislav Petkov,
	Jean-Christophe Guillain

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

Reported-by: Borislav Petkov <bp@alien8.de>
Fixes: c4cb23111103 ("iommu/amd: Add support for enable/disable IOPF")
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218900
Tested-by: Borislav Petkov <bp@alien8.de>
Tested-by: Jean-Christophe Guillain <jean-christophe@guillain.net>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
---
 drivers/iommu/amd/amd_iommu.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/amd/amd_iommu.h b/drivers/iommu/amd/amd_iommu.h
index 2fde1302a584..2d5945c982bd 100644
--- a/drivers/iommu/amd/amd_iommu.h
+++ b/drivers/iommu/amd/amd_iommu.h
@@ -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)
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-04 12:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-30  7:11 [PATCH rc] iommu/amd: Check EFR[EPHSup] bit before enabling PPR Vasant Hegde
2024-05-30  8:23 ` Suthikulpanit, Suravee
2024-06-04 12:00 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox