Re: [RFC PATCH 2/5] iommu: Add an unmap_pages() op for IOMMU drivers

2021-04-02 Thread Lu Baolu
Hi Isaac, On 4/3/21 1:25 AM, isa...@codeaurora.org wrote: On 2021-03-30 22:39, Lu Baolu wrote: On 3/31/21 1:36 PM, isa...@codeaurora.org wrote: On 2021-03-30 21:47, Lu Baolu wrote: On 3/31/21 11:00 AM, Isaac J. Manjarres wrote: Add a callback for IOMMU drivers to provide a path for the IOMMU

Re: [RFC PATCH 2/5] iommu: Add an unmap_pages() op for IOMMU drivers

2021-04-02 Thread isaacm
On 2021-03-30 22:39, Lu Baolu wrote: On 3/31/21 1:36 PM, isa...@codeaurora.org wrote: On 2021-03-30 21:47, Lu Baolu wrote: On 3/31/21 11:00 AM, Isaac J. Manjarres wrote: Add a callback for IOMMU drivers to provide a path for the IOMMU framework to call into an IOMMU driver, which can call into

Re: [PATCH] dma-mapping: make map_benchmark compile into module

2021-04-02 Thread Christoph Hellwig
On Wed, Mar 24, 2021 at 07:33:23AM +, Song Bao Hua (Barry Song) wrote: > The requirement comes from an colleague who is frequently changing > the map-bench code for some customized test purpose. and he doesn't > want to build kernel image and reboot every time. So I moved the > requirement to T

Re: [PATCH] dma-mapping: benchmark: use the correct HiSilicon copyright

2021-04-02 Thread Christoph Hellwig
Thanks, applied. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH] dma-mapping: add unlikely hint to error path in dma_mapping_error

2021-04-02 Thread Christoph Hellwig
Thanks, applied. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH] dma-mapping: benchmark: Add support for multi-pages map/unmap

2021-04-02 Thread Christoph Hellwig
Thanks, applied. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v1 2/2] iommu/tegra-smmu: Revert workaround that was needed for Nyan Big Chromebook

2021-04-02 Thread Dmitry Osipenko
01.04.2021 11:55, Nicolin Chen пишет: > On Mon, Mar 29, 2021 at 02:32:56AM +0300, Dmitry Osipenko wrote: >> The previous commit fixes problem where display client was attaching too >> early to IOMMU during kernel boot in a multi-platform kernel configuration >> which enables CONFIG_ARM_DMA_USE_IOMM

[PATCH 4/4] iommu/amd: move a few prototypes to include/linux/amd-iommu.h

2021-04-02 Thread Christoph Hellwig
A few functions that were intentended for the perf events support are currently declared in arch/x86/events/amd/iommu.h, which mens they are not in scope for the actual function definition. Also amdkfd has started using a few of them using externs in a .c file. End that misery by moving the proto

[PATCH 3/4] iommu/amd: remove a few unused exports

2021-04-02 Thread Christoph Hellwig
Remove exports for functions that are only used in the AMD IOMMU driver itself, or the also always builtin perf events support. Signed-off-by: Christoph Hellwig --- drivers/iommu/amd/init.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.

[PATCH 2/4] iommu/amd: remove the unused amd_iommu_get_v2_domain function

2021-04-02 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/iommu/amd/amd_iommu.h | 1 - drivers/iommu/amd/iommu.c | 34 -- 2 files changed, 35 deletions(-) diff --git a/drivers/iommu/amd/amd_iommu.h b/drivers/iommu/amd/amd_iommu.h index 026ce7f8d993b0..ed46dc754a2ad4 10064

[PATCH 1/4] iommu/amd: remove the unused device errata code

2021-04-02 Thread Christoph Hellwig
The device errata mechism is entirely unused, so remove it. Signed-off-by: Christoph Hellwig --- drivers/iommu/amd/amd_iommu_types.h | 1 - drivers/iommu/amd/iommu.c | 56 ++--- include/linux/amd-iommu.h | 18 -- 3 files changed, 3 insertions(

AMD IOMMU cleanups and dead code removal

2021-04-02 Thread Christoph Hellwig
Hi, this series cleans up a few random bits in the AMD IOMMU driver. Diffstat: arch/x86/events/amd/iommu.c|1 arch/x86/events/amd/iommu.h| 19 -- drivers/gpu/drm/amd/amdkfd/kfd_iommu.c |4 - drivers/iommu/amd/amd_iommu.h |2 drivers/iommu/amd/

RE: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-02 Thread Liu, Yi L
Hi Jason, > From: Jason Gunthorpe > Sent: Thursday, April 1, 2021 7:54 PM > > On Thu, Apr 01, 2021 at 07:04:01AM +, Liu, Yi L wrote: > > > After reading your reply in https://lore.kernel.org/linux- > iommu/20210331123801.gd1463...@nvidia.com/#t > > So you mean /dev/ioasid FD is per-VM inste

RE: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-02 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Friday, April 2, 2021 3:58 PM > > > From: Jason Gunthorpe > > Sent: Thursday, April 1, 2021 9:47 PM > > > > On Thu, Apr 01, 2021 at 01:43:36PM +, Liu, Yi L wrote: > > > > From: Jason Gunthorpe > > > > Sent: Thursday, April 1, 2021 9:16 PM > > > > > > > > On Thu, A

RE: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-02 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Tuesday, March 30, 2021 9:29 PM > > > > > First, userspace may use ioasid in a non-SVA scenario where ioasid is > > bound to specific security context (e.g. a control vq in vDPA) instead of > > tying to mm. In this case there is no pgtable binding initiated from us

RE: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-02 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, April 1, 2021 9:47 PM > > On Thu, Apr 01, 2021 at 01:43:36PM +, Liu, Yi L wrote: > > > From: Jason Gunthorpe > > > Sent: Thursday, April 1, 2021 9:16 PM > > > > > > On Thu, Apr 01, 2021 at 01:10:48PM +, Liu, Yi L wrote: > > > > > From: Jason Gunt

RE: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-02 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Friday, April 2, 2021 12:04 AM > > On Thu, Apr 01, 2021 at 02:08:17PM +, Liu, Yi L wrote: > > > DMA page faults are delivered to root-complex via page request message > and > > it is per-device according to PCIe spec. Page request handling flow is: > > > > 1)