Re: [PATCH 2/5] iommu/vt-d: Fix unaligned addresses for intel_flush_svm_range_dev()

2021-01-08 Thread Lu Baolu
Hi Will, On 2021/1/8 22:09, Will Deacon wrote: Hi Lu, On Fri, Jan 08, 2021 at 07:52:47AM +0800, Lu Baolu wrote: On 2021/1/6 9:09, Lu Baolu wrote: On 2021/1/6 3:03, Will Deacon wrote: On Thu, Dec 31, 2020 at 08:53:20AM +0800, Lu Baolu wrote: @@ -170,6 +172,22 @@ static void intel_flush_svm_r

Re: [PATCH 2/5] iommu/vt-d: Fix unaligned addresses for intel_flush_svm_range_dev()

2021-01-08 Thread Will Deacon
Hi Lu, On Fri, Jan 08, 2021 at 07:52:47AM +0800, Lu Baolu wrote: > On 2021/1/6 9:09, Lu Baolu wrote: > > On 2021/1/6 3:03, Will Deacon wrote: > > > On Thu, Dec 31, 2020 at 08:53:20AM +0800, Lu Baolu wrote: > > > > @@ -170,6 +172,22 @@ static void intel_flush_svm_range_dev > > > > (struct intel_svm

Re: [PATCH 2/5] iommu/vt-d: Fix unaligned addresses for intel_flush_svm_range_dev()

2021-01-07 Thread Lu Baolu
Hi Will, On 2021/1/6 9:09, Lu Baolu wrote: Hi Will, Happy New Year! On 2021/1/6 3:03, Will Deacon wrote: On Thu, Dec 31, 2020 at 08:53:20AM +0800, Lu Baolu wrote: The VT-d hardware will ignore those Addr bits which have been masked by the AM field in the PASID-based-IOTLB invalidation descri

Re: [PATCH 2/5] iommu/vt-d: Fix unaligned addresses for intel_flush_svm_range_dev()

2021-01-05 Thread Lu Baolu
Hi Will, Happy New Year! On 2021/1/6 3:03, Will Deacon wrote: On Thu, Dec 31, 2020 at 08:53:20AM +0800, Lu Baolu wrote: The VT-d hardware will ignore those Addr bits which have been masked by the AM field in the PASID-based-IOTLB invalidation descriptor. As the result, if the starting address

Re: [PATCH 2/5] iommu/vt-d: Fix unaligned addresses for intel_flush_svm_range_dev()

2021-01-05 Thread Will Deacon
On Thu, Dec 31, 2020 at 08:53:20AM +0800, Lu Baolu wrote: > The VT-d hardware will ignore those Addr bits which have been masked by > the AM field in the PASID-based-IOTLB invalidation descriptor. As the > result, if the starting address in the descriptor is not aligned with > the address mask, som

[PATCH 2/5] iommu/vt-d: Fix unaligned addresses for intel_flush_svm_range_dev()

2020-12-30 Thread Lu Baolu
The VT-d hardware will ignore those Addr bits which have been masked by the AM field in the PASID-based-IOTLB invalidation descriptor. As the result, if the starting address in the descriptor is not aligned with the address mask, some IOTLB caches might not invalidate. Hence people will see below e