Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-04-15 Thread Fenghua Yu
Hi, Zhangfei, On Fri, Apr 15, 2022 at 06:14:09PM +0800, zhangfei@foxmail.com wrote: > > > On 2022/4/15 下午5:51, Fenghua Yu wrote: > > On Thu, Apr 14, 2022 at 06:08:09PM +0800, zhangfei@foxmail.com wrote: > > > On 2022/4/12 下午11:35, zhangfei@foxmail.com wrote: > > > > Hi, Fenghua > >

Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-04-15 Thread zhangfei....@foxmail.com
On 2022/4/15 下午6:50, Fenghua Yu wrote: Hi, Zhangfei, On Fri, Apr 15, 2022 at 06:14:09PM +0800, zhangfei@foxmail.com wrote: On 2022/4/15 下午5:51, Fenghua Yu wrote: On Thu, Apr 14, 2022 at 06:08:09PM +0800, zhangfei@foxmail.com wrote: On 2022/4/12 下午11:35, zhangfei@foxmail.com

Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-04-15 Thread Fenghua Yu
Hi, Zhangfei, On Fri, Apr 15, 2022 at 07:52:03PM +0800, zhangfei@foxmail.com wrote: > > > On 2022/4/15 下午6:50, Fenghua Yu wrote: > > Hi, Zhangfei, > > > > On Fri, Apr 15, 2022 at 06:14:09PM +0800, zhangfei@foxmail.com wrote: > > I download this patch from: > >

Re: [PATCH 06/13] iommu/dart: Clean up bus_set_iommu()

2022-04-15 Thread Sven Peter via iommu
On Thu, Apr 14, 2022, at 14:42, Robin Murphy wrote: > Stop calling bus_set_iommu() since it's now unnecessary, and simplify > the probe failure path accordingly. > > Signed-off-by: Robin Murphy Tested-by: Sven Peter Reviewed-by: Sven Peter Can't wait until that saga is completed :) Sven

Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-04-15 Thread Fenghua Yu
On Thu, Apr 14, 2022 at 06:08:09PM +0800, zhangfei@foxmail.com wrote: > > On 2022/4/12 下午11:35, zhangfei@foxmail.com wrote: > > Hi, Fenghua > > > > On 2022/4/12 下午9:41, Fenghua Yu wrote: > > > Hi, Zhangfei, > > > > > > On Tue, Apr 12, 2022 at 03:04:09PM +0800, zhangfei@foxmail.com >

Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-04-15 Thread Fenghua Yu
Hi, Dave, On Tue, Apr 12, 2022 at 07:39:10AM -0700, Dave Hansen wrote: > On 4/12/22 06:41, Fenghua Yu wrote: > >> master process quit, mmput ->  mm_pasid_drop->ioasid_free > >> But this ignore driver's iommu_sva_unbind_device function, > >> iommu_sva_bind_device and iommu_sva_unbind_device are

Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-04-15 Thread zhangfei....@foxmail.com
On 2022/4/15 下午5:51, Fenghua Yu wrote: On Thu, Apr 14, 2022 at 06:08:09PM +0800, zhangfei@foxmail.com wrote: On 2022/4/12 下午11:35, zhangfei@foxmail.com wrote: Hi, Fenghua On 2022/4/12 下午9:41, Fenghua Yu wrote: Hi, Zhangfei, On Tue, Apr 12, 2022 at 03:04:09PM +0800,

Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-04-15 Thread Fenghua Yu
Hi, Zhangfei, On Fri, Apr 15, 2022 at 07:52:03PM +0800, zhangfei@foxmail.com wrote: > > On my X86 machine, nginx doesn't trigger the kernel sva binding function > > to allocate ioasid. I tried pre- nstalled nginx/openssl and also tried my > > built > > a few versions of nginx/openssl. nginx

Re: "dma-mapping: remove CONFIG_DMA_REMAP" causes AMD SME boot fail #forregzbot

2022-04-15 Thread Thorsten Leemhuis
TWIMC: this mail is primarily send for documentation purposes and for regzbot, my Linux kernel regression tracking bot. These mails usually contain '#forregzbot' in the subject, to make them easy to spot and filter. #regzbot fixed-by: 4fe87e818ea492ade079cc0 On 31.03.22 08:51, Thorsten Leemhuis

Re: [PATCH v5 1/2] PCI: ACPI: Support Microsoft's "DmaProperty"

2022-04-15 Thread Bjorn Helgaas
On Thu, Apr 14, 2022 at 04:15:47PM -0700, Rajat Jain via iommu wrote: > On Thu, Apr 7, 2022 at 12:17 PM Bjorn Helgaas wrote: > > On Fri, Mar 25, 2022 at 11:46:08AM -0700, Rajat Jain wrote: > > > Support the "DmaProperty" with the same semantics. This is useful for > > > internal PCI devices that

Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-04-15 Thread Jacob Pan
Hi zhangfei@foxmail.com, On Fri, 15 Apr 2022 19:52:03 +0800, "zhangfei@foxmail.com" wrote: > >>> A PASID might be still used even though it is freed on mm exit. > >>> > >>> process A: > >>> sva_bind(); > >>> ioasid_alloc() = N; // Get PASID N for the mm > >>> fork(): // spawn

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-15 Thread Lu Baolu
On 2022/4/14 20:42, Robin Murphy wrote: @@ -1883,27 +1900,12 @@ static int iommu_bus_init(struct bus_type *bus) */ int bus_set_iommu(struct bus_type *bus, const struct iommu_ops *ops) { - int err; - - if (ops == NULL) { - bus->iommu_ops = NULL; -

Re: [PATCH] iommu/arm-smmu-v3: Align size in __arm_smmu_tlb_inv_range

2022-04-15 Thread Nicolin Chen via iommu
On Thu, Apr 14, 2022 at 11:32:38AM +0100, Robin Murphy wrote: > > By looking at the call trace within arm_smmu_* functions: > >__arm_smmu_tlb_inv_range > >arm_smmu_tlb_inv_range_asid > >arm_smmu_mm_invalidate_range > >{from mm_notifier_* functions} > > > > There's no address

[GIT PULL] dma-mapping fixes for Linux 5.18

2022-04-15 Thread Christoph Hellwig
The following changes since commit 4fe87e818ea492ade079cc01a31d088e445f8539: dma-mapping: move pgprot_decrypted out of dma_pgprot (2022-04-01 06:46:51 +0200) are available in the Git repository at: git://git.infradead.org/users/hch/dma-mapping.git tags/dma-mapping-5.18-2 for you to fetch

Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-04-15 Thread zhangfei....@foxmail.com
On 2022/4/15 下午8:37, Fenghua Yu wrote: Hi, Zhangfei, On Fri, Apr 15, 2022 at 07:52:03PM +0800, zhangfei@foxmail.com wrote: On 2022/4/15 下午6:50, Fenghua Yu wrote: Hi, Zhangfei, On Fri, Apr 15, 2022 at 06:14:09PM +0800, zhangfei@foxmail.com wrote: I download this patch from:

Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-04-15 Thread zhangfei....@foxmail.com
On 2022/4/16 上午5:00, Jacob Pan wrote: Hi zhangfei@foxmail.com, On Fri, 15 Apr 2022 19:52:03 +0800, "zhangfei@foxmail.com" wrote: A PASID might be still used even though it is freed on mm exit. process A: sva_bind(); ioasid_alloc() = N; // Get PASID N for the mm

Re: [PATCH] crypto: qat - stop using iommu_present()

2022-04-15 Thread Herbert Xu
On Tue, Apr 05, 2022 at 01:25:11PM +0100, Robin Murphy wrote: > Even if an IOMMU might be present for some PCI segment in the system, > that doesn't necessarily mean it provides translation for the device > we care about. Replace iommu_present() with a more appropriate check. > > Signed-off-by: