iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Misc fixes to intel iommu driver
@ 2022-09-16  7:12 Yi Liu
  2022-09-16  7:12 ` [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination Yi Liu
  0 siblings, 1 reply; 8+ messages in thread
From: Yi Liu @ 2022-09-16  7:12 UTC (permalink / raw)
  To: baolu.lu
  Cc: kevin.tian, baolu.lu, yi.l.liu, raghunathan.srinivasan, iommu,
	joro, will

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(-)

-- 
2.34.1


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

* [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination
  2022-09-16  7:12 [PATCH 0/2] Misc fixes to intel iommu driver Yi Liu
@ 2022-09-16  7:12 ` Yi Liu
  2022-09-17  2:15   ` Baolu Lu
                     ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Yi Liu @ 2022-09-16  7:12 UTC (permalink / raw)
  To: baolu.lu
  Cc: kevin.tian, baolu.lu, yi.l.liu, raghunathan.srinivasan, iommu,
	joro, will, stable

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")
Cc: stable@vger.kernel.org
Reported-by: Raghunathan Srinivasan <raghunathan.srinivasan@intel.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
---
 drivers/iommu/intel/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 1f2cd43cf9bc..664499dddf0c 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -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. */
-- 
2.34.1


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

* Re: [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination
  2022-09-16  7:12 ` [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination Yi Liu
@ 2022-09-17  2:15   ` Baolu Lu
  2022-09-17 16:48   ` Jerry Snitselaar
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Baolu Lu @ 2022-09-17  2:15 UTC (permalink / raw)
  To: Yi Liu
  Cc: baolu.lu, kevin.tian, baolu.lu, raghunathan.srinivasan, iommu,
	joro, will, stable

On 2022/9/16 15:12, Yi Liu wrote:
> 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")
> Cc:stable@vger.kernel.org
> Reported-by: Raghunathan Srinivasan<raghunathan.srinivasan@intel.com>

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

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

* Re: [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination
  2022-09-16  7:12 ` [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination Yi Liu
  2022-09-17  2:15   ` Baolu Lu
@ 2022-09-17 16:48   ` Jerry Snitselaar
  2022-09-20  7:24   ` Tian, Kevin
  2022-09-21  2:44   ` Baolu Lu
  3 siblings, 0 replies; 8+ messages in thread
From: Jerry Snitselaar @ 2022-09-17 16:48 UTC (permalink / raw)
  To: Yi Liu
  Cc: baolu.lu, kevin.tian, baolu.lu, raghunathan.srinivasan, iommu,
	joro, will, stable

On Fri, Sep 16, 2022 at 12:12:11AM -0700, Yi Liu wrote:
> 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")
> 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

> ---
>  drivers/iommu/intel/iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> index 1f2cd43cf9bc..664499dddf0c 100644
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -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. */
> -- 
> 2.34.1
> 


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

* RE: [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination
  2022-09-16  7:12 ` [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination Yi Liu
  2022-09-17  2:15   ` Baolu Lu
  2022-09-17 16:48   ` Jerry Snitselaar
@ 2022-09-20  7:24   ` Tian, Kevin
  2022-09-21  2:44   ` Baolu Lu
  3 siblings, 0 replies; 8+ messages in thread
From: Tian, Kevin @ 2022-09-20  7:24 UTC (permalink / raw)
  To: Liu, Yi L, baolu.lu
  Cc: Lu, Baolu, Srinivasan, Raghunathan, iommu, joro, will, stable

> From: Liu, Yi L <yi.l.liu@intel.com>
> 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")
> 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: Kevin Tian <kevin.tian@intel.com>

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

* Re: [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination
  2022-09-16  7:12 ` [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination Yi Liu
                     ` (2 preceding siblings ...)
  2022-09-20  7:24   ` Tian, Kevin
@ 2022-09-21  2:44   ` Baolu Lu
  2022-09-21  3:35     ` Yi Liu
  3 siblings, 1 reply; 8+ messages in thread
From: Baolu Lu @ 2022-09-21  2:44 UTC (permalink / raw)
  To: Yi Liu
  Cc: baolu.lu, kevin.tian, baolu.lu, raghunathan.srinivasan, iommu,
	joro, will, stable

On 9/16/22 3:12 PM, Yi Liu wrote:
> 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")
> Cc:stable@vger.kernel.org
> Reported-by: Raghunathan Srinivasan<raghunathan.srinivasan@intel.com>
> Signed-off-by: Yi Liu<yi.l.liu@intel.com>

Queued for v6.0. Thank you very much!

https://lore.kernel.org/linux-iommu/20220921024054.3570256-1-baolu.lu@linux.intel.com

Best regards,
baolu

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

* Re: [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination
  2022-09-21  2:44   ` Baolu Lu
@ 2022-09-21  3:35     ` Yi Liu
  2022-09-21  6:08       ` Baolu Lu
  0 siblings, 1 reply; 8+ messages in thread
From: Yi Liu @ 2022-09-21  3:35 UTC (permalink / raw)
  To: Baolu Lu
  Cc: kevin.tian, baolu.lu, raghunathan.srinivasan, iommu, joro, will, stable



On 2022/9/21 10:44, Baolu Lu wrote:
> On 9/16/22 3:12 PM, Yi Liu wrote:
>> 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")
>> Cc:stable@vger.kernel.org
>> Reported-by: Raghunathan Srinivasan<raghunathan.srinivasan@intel.com>
>> Signed-off-by: Yi Liu<yi.l.liu@intel.com>
> 
> Queued for v6.0. Thank you very much!
> 
> https://lore.kernel.org/linux-iommu/20220921024054.3570256-1-baolu.lu@linux.intel.com 
> 

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/

> Best regards,
> baolu

-- 
Regards,
Yi Liu

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

* Re: [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination
  2022-09-21  3:35     ` Yi Liu
@ 2022-09-21  6:08       ` Baolu Lu
  0 siblings, 0 replies; 8+ messages in thread
From: Baolu Lu @ 2022-09-21  6:08 UTC (permalink / raw)
  To: Yi Liu
  Cc: baolu.lu, kevin.tian, baolu.lu, raghunathan.srinivasan, iommu,
	joro, will, stable

On 2022/9/21 11:35, Yi Liu wrote:
> On 2022/9/21 10:44, Baolu Lu wrote:
>> On 9/16/22 3:12 PM, Yi Liu wrote:
>>> 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")
>>> Cc:stable@vger.kernel.org
>>> Reported-by: Raghunathan Srinivasan<raghunathan.srinivasan@intel.com>
>>> Signed-off-by: Yi Liu<yi.l.liu@intel.com>
>>
>> Queued for v6.0. Thank you very much!
>>
>> https://lore.kernel.org/linux-iommu/20220921024054.3570256-1-baolu.lu@linux.intel.com
> 
> 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

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

end of thread, other threads:[~2022-09-21  6:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-16  7:12 [PATCH 0/2] Misc fixes to intel iommu driver Yi Liu
2022-09-16  7:12 ` [PATCH 1/2] iommu/vt-d: Check correct capability for sagaw determination Yi Liu
2022-09-17  2:15   ` Baolu Lu
2022-09-17 16:48   ` Jerry Snitselaar
2022-09-20  7:24   ` Tian, Kevin
2022-09-21  2:44   ` Baolu Lu
2022-09-21  3:35     ` Yi Liu
2022-09-21  6:08       ` Baolu Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).