iommu/vt-d: Check correct capability for sagaw determination
commit1548978070upstream. Check 5-level paging capability for 57 bits address width instead of checking 1GB large page capability. Fixes:53fc7ad6ed("iommu/vt-d: Correctly calculate sagaw value of IOMMU") Cc: stable@vger.kernel.org Reported-by: Raghunathan Srinivasan <raghunathan.srinivasan@intel.com> Signed-off-by: Yi Liu <yi.l.liu@intel.com> Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Raghunathan Srinivasan <raghunathan.srinivasan@intel.com> Link: https://lore.kernel.org/r/20220916071212.2223869-2-yi.l.liu@intel.com Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
213cdb2901
commit
0d99b180ce
1 changed files with 1 additions and 1 deletions
|
|
@ -569,7 +569,7 @@ static unsigned long __iommu_calculate_sagaw(struct intel_iommu *iommu)
|
|||
{
|
||||
unsigned long fl_sagaw, sl_sagaw;
|
||||
|
||||
fl_sagaw = BIT(2) | (cap_fl1gp_support(iommu->cap) ? BIT(3) : 0);
|
||||
fl_sagaw = BIT(2) | (cap_5lp_support(iommu->cap) ? BIT(3) : 0);
|
||||
sl_sagaw = cap_sagaw(iommu->cap);
|
||||
|
||||
/* Second level only. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue