Re: [PATCH v2 1/2] uacce: Remove mm_exit() op

2020-04-23 Thread Zhangfei Gao
On 2020/4/23 下午8:53, Jean-Philippe Brucker wrote: The mm_exit() op will be removed from the SVA API. When a process dies and its mm goes away, the IOMMU driver won't notify device drivers anymore. Drivers should expect to handle a lot more aborted DMA. On the upside, it does greatly simplify

Re: iommu_iova slab eats too much memory

2020-04-23 Thread Bin
Hello? anyone there? Bin 于2020年4月23日周四 下午5:14写道: > Forget to mention, I've already disabled the slab merge, so this is what > it is. > > Bin 于2020年4月23日周四 下午5:11写道: > >> Hey, guys: >> >> I'm running a batch of CoreOS boxes, the lsb_release is: >> >> ``` >> # cat /etc/lsb-release >>

[PATCH] dma-contiguous: fix comment for dma_release_from_contiguous

2020-04-23 Thread Peter Collingbourne via iommu
Commit 90ae409f9eb3 ("dma-direct: fix zone selection after an unaddressable CMA allocation") changed the logic in dma_release_from_contiguous to remove the normal pages fallback path, but did not update the comment. Fix that. Signed-off-by: Peter Collingbourne --- kernel/dma/contiguous.c | 4

Re: [PATCHv2] iommu/arm-smmu: Make remove callback message more informative

2020-04-23 Thread Doug Anderson
Hi, On Thu, Apr 23, 2020 at 2:55 AM Sai Prakash Ranjan wrote: > > Currently on reboot/shutdown, the following messages are > displayed on the console as error messages before the > system reboots/shutdown as part of remove callback. > > On SC7180: > > arm-smmu 1500.iommu: removing device

Re: iommu_iova slab eats too much memory

2020-04-23 Thread Bin
Forget to mention, I've already disabled the slab merge, so this is what it is. Bin 于2020年4月23日周四 下午5:11写道: > Hey, guys: > > I'm running a batch of CoreOS boxes, the lsb_release is: > > ``` > # cat /etc/lsb-release > DISTRIB_ID="Container Linux by CoreOS" > DISTRIB_RELEASE=2303.3.0 >

iommu_iova slab eats too much memory

2020-04-23 Thread Bin
Hey, guys: I'm running a batch of CoreOS boxes, the lsb_release is: ``` # cat /etc/lsb-release DISTRIB_ID="Container Linux by CoreOS" DISTRIB_RELEASE=2303.3.0 DISTRIB_CODENAME="Rhyolite" DISTRIB_DESCRIPTION="Container Linux by CoreOS 2303.3.0 (Rhyolite)" ``` ``` # uname -a Linux cloud-worker-25

[PATCH v2 1/2] uacce: Remove mm_exit() op

2020-04-23 Thread Jean-Philippe Brucker
The mm_exit() op will be removed from the SVA API. When a process dies and its mm goes away, the IOMMU driver won't notify device drivers anymore. Drivers should expect to handle a lot more aborted DMA. On the upside, it does greatly simplify the queue management. The uacce_mm struct, that tracks

[PATCH v2 2/2] iommu: Remove iommu_sva_ops::mm_exit()

2020-04-23 Thread Jean-Philippe Brucker
After binding a device to an mm, device drivers currently need to register a mm_exit handler. This function is called when the mm exits, to gracefully stop DMA targeting the address space and flush page faults to the IOMMU. This is deemed too complex for the MMU release() notifier, which may be

[PATCH v2 0/2] iommu: Remove iommu_sva_ops::mm_exit()

2020-04-23 Thread Jean-Philippe Brucker
The IOMMU SVA API currently requires device drivers to implement an mm_exit() callback, which stops device jobs that do DMA. This function is called in the release() MMU notifier, when an address space that is shared with a device exits. It has been noted several time during discussions about SVA

Re: [EXT] Re: [RFC PATCH 1/4] bus: fsl-mc: add custom .dma_configure implementation

2020-04-23 Thread Lorenzo Pieralisi
On Thu, Apr 23, 2020 at 09:56:54AM +, Makarand Pawagi wrote: [...] > > > At a first glance, looks like this could very well fix the ACPI > > > scenario, but I have some unclarities on the approach: > > > * are we going to rely in DT and ACPI generic layers even if these > > > devices are

RE: [EXT] Re: [RFC PATCH 1/4] bus: fsl-mc: add custom .dma_configure implementation

2020-04-23 Thread Makarand Pawagi
> -Original Message- > From: Robin Murphy > Sent: Wednesday, April 15, 2020 11:02 PM > To: Laurentiu Tudor ; Lorenzo Pieralisi > > Cc: linux-ker...@vger.kernel.org; iommu@lists.linux-foundation.org; linux-arm- > ker...@lists.infradead.org; linux-a...@vger.kernel.org; >

Re: [PATCH 04/29] staging: media: ipu3: use vmap instead of reimplementing it

2020-04-23 Thread Sakari Ailus
On Tue, Apr 14, 2020 at 03:13:23PM +0200, Christoph Hellwig wrote: > Just use vmap instead of messing with vmalloc internals. > > Signed-off-by: Christoph Hellwig > Acked-by: Peter Zijlstra (Intel) Thanks! Acked-by: Sakari Ailus -- Sakari Ailus

[PATCHv2] iommu/arm-smmu: Make remove callback message more informative

2020-04-23 Thread Sai Prakash Ranjan
Currently on reboot/shutdown, the following messages are displayed on the console as error messages before the system reboots/shutdown as part of remove callback. On SC7180: arm-smmu 1500.iommu: removing device with active domains! arm-smmu 504.iommu: removing device with active

Re: [PATCH] iommu/arm-smmu: Demote error messages to debug in shutdown callback

2020-04-23 Thread Sai Prakash Ranjan
On 2020-04-23 14:58, Robin Murphy wrote: On 2020-04-23 9:17 am, Sai Prakash Ranjan wrote: [...] Any update on the status here?  If I'm reading the conversation above, Robin said: "we'll *always* see the warning because there's no way to tear down the default DMA domains, and even if all

Re: [PATCH] iommu/arm-smmu: Demote error messages to debug in shutdown callback

2020-04-23 Thread Robin Murphy
On 2020-04-23 9:17 am, Sai Prakash Ranjan wrote: [...] Any update on the status here?  If I'm reading the conversation above, Robin said: "we'll *always* see the warning because there's no way to tear down the default DMA domains, and even if all devices *have* been nicely quiesced there's no

Re: [PATCH] iommu/arm-smmu: Demote error messages to debug in shutdown callback

2020-04-23 Thread Sai Prakash Ranjan
Hi, On 2020-04-23 01:19, Doug Anderson wrote: Hi, On Tue, Mar 31, 2020 at 12:53 AM Sai Prakash Ranjan wrote: Hi Will, On 2020-03-31 13:14, Will Deacon wrote: > On Tue, Mar 31, 2020 at 01:06:11PM +0530, Sai Prakash Ranjan wrote: >> On 2020-03-30 23:54, Doug Anderson wrote: >> > On Sat, Mar

RE: [PATCH v12 2/8] iommu/vt-d: Use a helper function to skip agaw for SL

2020-04-23 Thread Tian, Kevin
> From: Jacob Pan > Sent: Wednesday, April 22, 2020 2:53 AM > > An Intel iommu domain uses 5-level page table by default. If the > iommu that the domain tries to attach supports less page levels, > the top level page tables should be skipped. Add a helper to do > this so that it could be used in