Skip to contentSkip to conversation

Misc fixes to intel iommu driver

PATCH Applied Yi Liu 4 participants 8 messages Sep 16, 2022 – Sep 21, 2022

Subsystems (3)
lore
Share & tools
lore

Yi Liu

author
#0 lore raw

cover Misc fixes to intel iommu driver

One fix and one cleanup.

Base commit 3245cb65fd91cd514801bf91f5a3066d562f0ac4

Yi Liu (2):
iommu/vt-d: Check correct capability for sagaw determination iommu/vt-d: Rename cap_5lp_support to cap_fl5lp_support

 drivers/iommu/intel/cap_audit.c | 4 ++--
 drivers/iommu/intel/iommu.c     | 2 +-
 drivers/iommu/intel/iommu.h     | 2 +-
 drivers/iommu/intel/pasid.c     | 2 +-
 drivers/iommu/intel/svm.c       | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 1/2 iommu/vt-d: Check correct capability for sagaw determination

Check 5-level paging capability for 57 bits address width instead of checking 1GB large page capability.

Fixes 53fc7ad6edf2 ("iommu/vt-d: Correctly calculate sagaw value of IOMMU")
---
 drivers/iommu/intel/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/intel/iommu.c +1 -1
index 1f2cd43cf9bc..664499dddf0c 100644
@@ -399,7 +399,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. */
Signature · 1 line
2.34.1
maintainer
#2 lore raw

Re: [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination

Quoted 6 lines · Yi Liu

Check 5-level paging capability for 57 bits address width instead of checking 1GB large page capability.

Fixes 53fc7ad6edf2 ("iommu/vt-d: Correctly calculate sagaw value of IOMMU")

This fix is fine to me. Thanks for doing this.

Raghu, what do you think of this fixing? If it works for you, can I have your reviewed-by.

Best regards,
baolu

Reviewed-by on v1 1/2
#3 lore raw

Re: [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination

In reply to Yi Liu
Quoted 7 lines · Yi Liu

Check 5-level paging capability for 57 bits address width instead of checking 1GB large page capability.

Fixes 53fc7ad6edf2 ("iommu/vt-d: Correctly calculate sagaw value of IOMMU")
Quoted 20 lines
---
 drivers/iommu/intel/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/intel/iommu.c +1 -1
index 1f2cd43cf9bc..664499dddf0c 100644
@@ -399,7 +399,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. */
Signature · 1 line
2.34.1
Reviewed-by on v1 1/2
#4 lore raw

RE: [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination

In reply to Yi Liu
Quoted 11 lines

From: Liu, Yi L <[email protected]>
Sent: Friday, September 16, 2022 3:12 PM

Check 5-level paging capability for 57 bits address width instead of checking 1GB large page capability.

Fixes 53fc7ad6edf2 ("iommu/vt-d: Correctly calculate sagaw value of

IOMMU")

maintainer Applied
#5 lore raw

Re: [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination

In reply to Yi Liu
Quoted 7 lines · Yi Liu

Check 5-level paging capability for 57 bits address width instead of checking 1GB large page capability.

Fixes 53fc7ad6edf2 ("iommu/vt-d: Correctly calculate sagaw value of IOMMU")

Queued for v6.0. Thank you very much!

https://lore.kernel.org/linux-iommu/[email protected]

Best regards,
baolu

author
#6 lore raw

Re: [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination

Quoted 4 lines · Baolu Lu
Quoted 3 lines · Yi Liu

Check 5-level paging capability for 57 bits address width instead of checking 1GB large page capability.

Quoted 9 lines
Quoted 4 lines
Fixes 53fc7ad6edf2 ("iommu/vt-d: Correctly calculate sagaw value of IOMMU")

Queued for v6.0. Thank you very much!

https://lore.kernel.org/linux-iommu/[email protected]

grt. btw. how about below? not sure why it didn't show up in this series. :(

https://lore.kernel.org/linux-iommu/BN9PR11MB5276F062B5C0C08F10EFB49F8C4C9@BN9PR11MB5276.namprd11.prod.outlook.com/

Quoted 2 lines

Best regards,
baolu

Signature · 2 lines
Regards,
Yi Liu
maintainer
#7 lore raw

Re: [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination

Quoted 10 lines · Yi Liu
Quoted 9 lines · Baolu Lu
Quoted 7 lines · Yi Liu

Check 5-level paging capability for 57 bits address width instead of checking 1GB large page capability.

Fixes 53fc7ad6edf2 ("iommu/vt-d: Correctly calculate sagaw value of IOMMU")
Quoted 7 lines
Quoted 3 lines

Queued for v6.0. Thank you very much!

https://lore.kernel.org/linux-iommu/[email protected]

grt. btw. how about below? not sure why it didn't show up in this series. 🙁

https://lore.kernel.org/linux-iommu/BN9PR11MB5276F062B5C0C08F10EFB49F8C4C9@BN9PR11MB5276.namprd11.prod.outlook.com/

This is not a fix. I will queue it for v6.1-rc1 later.

Best regards,
baolu