Skip to content

Commit

Permalink
iommu/amd: Check EFR[EPHSup] bit before enabling PPR
Browse files Browse the repository at this point in the history
Check for EFR[EPHSup] bit before enabling PPR. This bit must be set
to enable PPR.

Reported-by: Borislav Petkov <[email protected]>
Fixes: c4cb231 ("iommu/amd: Add support for enable/disable IOPF")
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218900
Tested-by: Borislav Petkov <[email protected]>
Tested-by: Jean-Christophe Guillain <[email protected]>
Signed-off-by: Vasant Hegde <[email protected]>
Reviewed-by: Suravee Suthikulpanit <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
hegdevasant authored and joergroedel committed Jun 4, 2024
1 parent 998a0a3 commit 48dc345
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/iommu/amd/amd_iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 48dc345

Please sign in to comment.