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

2021-03-23 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: tiantao (H) > Sent: Wednesday, March 24, 2021 3:18 PM > To: a...@linux-foundation.org; pet...@infradead.org; paul...@kernel.org; > a...@kernel.org; t...@linutronix.de; rost...@goodmis.org; h...@lst.de; > m.szyprow...@samsung.com; Song Bao Hua (Barry Song) >

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

2021-03-23 Thread Tian Tao
under some scenarios, it is necessary to compile map_benchmark into module to test iommu, so this patch changed Kconfig and export_symbol to implement map_benchmark compiled into module. On the other hand, map_benchmark is a driver, which is supposed to be able to run as a module. Signed-off-by:

Re: [PATCH 0/3] Apple M1 DART IOMMU driver

2021-03-23 Thread Mark Kettenis
> Date: Tue, 23 Mar 2021 14:53:46 -0600 > From: Rob Herring > > On Sun, Mar 21, 2021 at 05:00:50PM +0100, Mark Kettenis wrote: > > > Date: Sat, 20 Mar 2021 15:19:33 + > > > From: Sven Peter > > > > > > Hi, > > > > > > After Hector's initial work [1] to bring up Linux on Apple's M1 it's tim

[PATCH] iommu/amd: page-specific invalidations for more than one page

2021-03-23 Thread Nadav Amit
From: Nadav Amit Currently, IOMMU invalidations and device-IOTLB invalidations using AMD IOMMU fall back to full address-space invalidation if more than a single page need to be flushed. Full flushes are especially inefficient when the IOMMU is virtualized by a hypervisor, since it requires the

Re: [PATCH 0/3] Apple M1 DART IOMMU driver

2021-03-23 Thread Sven Peter via iommu
Hi Mark, On Tue, Mar 23, 2021, at 21:00, Mark Kettenis wrote: > The problem with both #1 and #2 is that you end up with two references > to (effectively) different iommu's in the dwc3 device node. I don't > see how that is compatible with the idea of using a single translation > table for both su

Re: [PATCH 0/3] Apple M1 DART IOMMU driver

2021-03-23 Thread Rob Herring
On Sun, Mar 21, 2021 at 05:00:50PM +0100, Mark Kettenis wrote: > > Date: Sat, 20 Mar 2021 15:19:33 + > > From: Sven Peter > > > > Hi, > > > > After Hector's initial work [1] to bring up Linux on Apple's M1 it's time to > > bring up more devices. Most peripherals connected to the SoC are behi

Re: [PATCH 0/3] Apple M1 DART IOMMU driver

2021-03-23 Thread Mark Kettenis
> Date: Mon, 22 Mar 2021 23:17:31 +0100 > From: "Sven Peter" > > Hi Mark, > > On Sun, Mar 21, 2021, at 19:35, Mark Kettenis wrote: > > > > Guess we do need to understand a little bit better how the USB DART > > actually works. My hypothesis (based on our discussion on #asahi) is > > that the XH

RE: [RFC PATCH v2 1/8] ACPICA: IORT: Update for revision E

2021-03-23 Thread Kaneda, Erik
> -Original Message- > From: Lorenzo Pieralisi > Sent: Tuesday, March 23, 2021 8:54 AM > To: Kaneda, Erik > Cc: Shameerali Kolothum Thodi ; > linux-arm-ker...@lists.infradead.org; linux-a...@vger.kernel.org; > iommu@lists.linux-foundation.org; de...@acpica.org; Moore, Robert > ; Linuxa

Re: [PATCH 5/5] iommu/vt-d: Make unnecessarily global functions static

2021-03-23 Thread Christoph Hellwig
On Tue, Mar 23, 2021 at 09:06:00AM +0800, Lu Baolu wrote: > Make some functions static as they are only used inside pasid.c. > > Signed-off-by: Lu Baolu Looks good, Reviewed-by: Christoph Hellwig ___ iommu mailing list iommu@lists.linux-foundation.or

Re: [PATCH 4/5] iommu/vt-d: Remove unused function declarations

2021-03-23 Thread Christoph Hellwig
On Tue, Mar 23, 2021 at 09:05:59AM +0800, Lu Baolu wrote: > Some functions have been deprecated. Remove the remaining function > delarations. s/deprecated/removed/g Otherwise looks good: Reviewed-by: Christoph Hellwig ___ iommu mailing list iommu@list

Re: [PATCH 3/5] iommu/vt-d: Remove SVM_FLAG_PRIVATE_PASID

2021-03-23 Thread Christoph Hellwig
On Tue, Mar 23, 2021 at 09:05:58AM +0800, Lu Baolu wrote: > The SVM_FLAG_PRIVATE_PASID has never been referenced in the tree, and > there's no plan to have anything to use it. So cleanup it. > > Signed-off-by: Lu Baolu Looks good, Reviewed-by: Christoph Hellwig But can we take this a little f

Re: [PATCH 2/5] iommu/vt-d: Remove svm_dev_ops

2021-03-23 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 1/5] iommu/vt-d: Remove unused dma map/unmap trace events

2021-03-23 Thread Christoph Hellwig
On Tue, Mar 23, 2021 at 09:05:56AM +0800, Lu Baolu wrote: > With commit c588072bba6b5 ("iommu/vt-d: Convert intel iommu driver to > the iommu ops"), the trace events for dma map/unmap have no users any > more. Cleanup them to make the code neat. > > Signed-off-by: Lu Baolu Looks good, Reviewed-

Re: [RFC PATCH v2 1/8] ACPICA: IORT: Update for revision E

2021-03-23 Thread Lorenzo Pieralisi
On Mon, Mar 22, 2021 at 09:57:58PM +, Kaneda, Erik wrote: > > > > -Original Message- > > From: Shameerali Kolothum Thodi > > > > Sent: Monday, March 22, 2021 3:36 AM > > To: Kaneda, Erik ; linux-arm- > > ker...@lists.infradead.org; linux-a...@vger.kernel.org; iommu@lists.linux- > > f

Re: [PATCH 3/3] iova: Correct comment for free_cpu_cached_iovas()

2021-03-23 Thread John Garry
On 23/03/2021 13:05, Robin Murphy wrote: On 2021-03-01 12:12, John Garry wrote: Function free_cpu_cached_iovas() is not only called when a CPU is hotplugged, so remove that part of the code comment. FWIW I read it as clarifying why this is broken out into a separate function vs. a monolithic

Re: [PATCH 3/3] iova: Correct comment for free_cpu_cached_iovas()

2021-03-23 Thread Robin Murphy
On 2021-03-01 12:12, John Garry wrote: Function free_cpu_cached_iovas() is not only called when a CPU is hotplugged, so remove that part of the code comment. FWIW I read it as clarifying why this is broken out into a separate function vs. a monolithic "free all cached IOVAs" routine that handl

Re: [PATCH 1/3] iova: Add CPU hotplug handler to flush rcaches

2021-03-23 Thread Robin Murphy
On 2021-03-01 12:12, John Garry wrote: Like the intel IOMMU driver already does, flush the per-IOVA domain CPU rcache when a CPU goes offline - there's no point in keeping it. Thanks John! Reviewed-by: Robin Murphy Signed-off-by: John Garry --- drivers/iommu/iova.c | 30 +++

Re: [PATCH v13 06/10] iommu: Add a page fault handler

2021-03-23 Thread Jean-Philippe Brucker
On Tue, Mar 02, 2021 at 09:57:27PM -0800, Raj, Ashok wrote: > > + ret = handle_mm_fault(vma, prm->addr, fault_flags, NULL); > > Should we add a trace similar to trace_page_fault_user() or kernel in > arch/x86/kernel/mm/fault.c Yes that would definitely be useful for debugging hardware and deve

Re: [PATCH v13 06/10] iommu: Add a page fault handler

2021-03-23 Thread Jean-Philippe Brucker
On Wed, Mar 03, 2021 at 01:27:34PM +0800, Lu Baolu wrote: > I have tested this framework with the Intel VT-d implementation. It > works as expected. Hence, > > Reviewed-by: Lu Baolu > Tested-by: Lu Baolu Thanks! > One possible future optimization is that we could allow the system > administrat

Re: [PATCH v13 06/10] iommu: Add a page fault handler

2021-03-23 Thread Jean-Philippe Brucker
On Tue, Mar 02, 2021 at 03:59:57PM -0800, Jacob Pan wrote: > Hi Jean-Philippe, > > A few comments from the p.o.v of converting VT-d to this framework. Mostly > about potential optimization. I think VT-d SVA code will be able to use this > work. > +Ashok provided many insight. > > FWIW, > Reviewed