Re: [rfc 4/6] dma-remap: dynamically expanding atomic pools

2020-03-03 Thread David Rientjes via iommu
On Sun, 1 Mar 2020, David Rientjes wrote: > When an atomic pool becomes fully depleted because it is now relied upon > for all non-blocking allocations through the DMA API, allow background > expansion of each pool by a kworker. > > When an atomic pool has less than the default size of memory

Re: [PATCH] iommu: silence iommu group prints

2020-03-03 Thread Russell King - ARM Linux admin
On Tue, Mar 03, 2020 at 05:55:05PM +0200, Laurentiu Tudor wrote: > From c98dc05cdd45ae923654f2427985bd28bcde4bb2 Mon Sep 17 00:00:00 2001 > From: Laurentiu Tudor > Date: Thu, 13 Feb 2020 11:59:12 +0200 > Subject: [PATCH 1/4] bus: fsl-mc: add custom .dma_configure implementation > Content-Type:

[RESEND PATCH 2/4] iommu/omap: Fix printing format for size_t on 64-bit

2020-03-03 Thread Krzysztof Kozlowski
Print size_t as %zu or %zx to fix -Wformat warnings when compiling on 64-bit platform (e.g. with COMPILE_TEST): drivers/iommu/omap-iommu.c: In function ‘flush_iotlb_page’: drivers/iommu/omap-iommu.c:437:47: warning: format ‘%x’ expects argument of type ‘unsigned int’, but

[RESEND PATCH 1/4] iommu/omap: Fix pointer cast -Wpointer-to-int-cast warnings on 64 bit

2020-03-03 Thread Krzysztof Kozlowski
pointers should be casted to unsigned long to avoid -Wpointer-to-int-cast warnings when compiling on 64-bit platform (e.g. with COMPILE_TEST): drivers/iommu/omap-iommu.c: In function ‘omap2_iommu_enable’: drivers/iommu/omap-iommu.c:170:25: warning: cast from pointer to integer of

[RESEND PATCH 4/4] iommu: Enable compile testing for some of drivers

2020-03-03 Thread Krzysztof Kozlowski
Some of the IOMMU drivers can be compile tested to increase build coverage. The OMAP, Rockchip and Exynos drivers use device.dev_archdata.iommu field which does not exist on all platforms. The sPAPR TCE and ARM SMMU have also restrictions where they can be built. Signed-off-by: Krzysztof

[RESEND PATCH 3/4] iommu/omap: Fix -Woverflow warnings when compiling on 64-bit architectures

2020-03-03 Thread Krzysztof Kozlowski
Although the OMAP IOMMU driver supports only ARMv7 (32-bit) platforms, it can be compile tested for other architectures, including 64-bit ones. In such case the warning appears: In file included from drivers/iommu/omap-iommu.c:33:0: drivers/iommu/omap-iommu.c: In function

Re: [PATCH 00/14] iommu: Move iommu_fwspec out of 'struct device'

2020-03-03 Thread Will Deacon
Hi Joerg, On Fri, Feb 28, 2020 at 04:08:06PM +0100, Joerg Roedel wrote: > here is a patch-set to rename iommu_param to dev_iommu and > establish it as a struct for generic per-device iommu-data. > Also move the iommu_fwspec pointer from struct device into > dev_iommu to have less iommu-related

Re: [PATCH] iommu: silence iommu group prints

2020-03-03 Thread Laurentiu Tudor
Hi Russell, On 03.03.2020 17:49, Russell King - ARM Linux admin wrote: On Tue, Mar 03, 2020 at 04:18:57PM +0200, Laurentiu Tudor wrote: On 28.02.2020 20:32, Robin Murphy wrote: [ +Laurentiu ] Hi Russell, Thanks for sharing a log, now I properly understand what's up... further comments at

Re: [PATCH v2] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-03-03 Thread Konrad Rzeszutek Wilk
On Tue, Feb 04, 2020 at 07:35:00PM +, Ashish Kalra wrote: > Hello Konrad, > > Looking fwd. to your feedback regarding support of other memory > encryption architectures such as Power, S390, etc. > > Thanks, > Ashish > > On Fri, Jan 24, 2020 at 11:00:08PM +, Ashish Kalra wrote: > > On

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-03 Thread Auger Eric
Hi Michael, Joerg, On 3/3/20 5:09 PM, Michael S. Tsirkin wrote: > On Tue, Mar 03, 2020 at 04:53:19PM +0100, Joerg Roedel wrote: >> On Tue, Mar 03, 2020 at 09:00:05AM -0500, Michael S. Tsirkin wrote: >>> Not necessarily. E.g. some power systems have neither. >>> There are also systems looking to

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-03 Thread Michael S. Tsirkin
On Tue, Mar 03, 2020 at 04:53:19PM +0100, Joerg Roedel wrote: > On Tue, Mar 03, 2020 at 09:00:05AM -0500, Michael S. Tsirkin wrote: > > Not necessarily. E.g. some power systems have neither. > > There are also systems looking to bypass ACPI e.g. for boot speed. > > If there is no firmware layer

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-03 Thread Joerg Roedel
On Tue, Mar 03, 2020 at 09:00:05AM -0500, Michael S. Tsirkin wrote: > Not necessarily. E.g. some power systems have neither. > There are also systems looking to bypass ACPI e.g. for boot speed. If there is no firmware layer between the hardware and the OS the necessary information the OS needs to

Re: [PATCH] iommu: silence iommu group prints

2020-03-03 Thread Laurentiu Tudor
On 28.02.2020 20:32, Robin Murphy wrote: [ +Laurentiu ] Hi Russell, Thanks for sharing a log, now I properly understand what's up... further comments at the end (for context). On 28/02/2020 10:06 am, Russell King - ARM Linux admin wrote: On Fri, Feb 28, 2020 at 09:33:40AM +, John

Re: [PATCH] iommu: silence iommu group prints

2020-03-03 Thread Russell King - ARM Linux admin
On Tue, Mar 03, 2020 at 04:18:57PM +0200, Laurentiu Tudor wrote: > > > On 28.02.2020 20:32, Robin Murphy wrote: > > [ +Laurentiu ] > > > > Hi Russell, > > > > Thanks for sharing a log, now I properly understand what's up... further > > comments at the end (for context). > > > > On 28/02/2020

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-03 Thread Michael S. Tsirkin
On Mon, Mar 02, 2020 at 05:16:12PM +0100, Joerg Roedel wrote: > On Fri, Feb 28, 2020 at 06:25:36PM +0100, Jean-Philippe Brucker wrote: > > This solution isn't elegant nor foolproof, but is the best we can do at > > the moment and works with existing virtio-iommu implementations. It also > >

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-03 Thread Michael S. Tsirkin
On Tue, Mar 03, 2020 at 02:01:56PM +0100, Joerg Roedel wrote: > Hi Eric, > > On Tue, Mar 03, 2020 at 11:19:20AM +0100, Auger Eric wrote: > > Michael has pushed this solution (putting the "configuration in the PCI > > config space"), I think for those main reasons: > > - ACPI may not be supported

Re: [PATCH v9 00/11] SMMUv3 Nested Stage Setup (VFIO part)

2020-03-03 Thread Auger Eric
Hi Zhangfei, On 3/3/20 1:57 PM, zhangfei wrote: > Hi, Eric > > On 2019/11/20 下午6:18, Auger Eric wrote: >> This series brings the VFIO part of HW nested paging support in the SMMUv3. The series depends on: [PATCH v9 00/14] SMMUv3 Nested Stage Setup (IOMMU part)

Re: [PATCH V2 3/5] iommu: Add support to change default domain of an iommu_group

2020-03-03 Thread Joerg Roedel
Hi Baolu, On Tue, Mar 03, 2020 at 02:47:02PM +0800, Lu Baolu wrote: > Theoretically speaking, per-device default domain is impractical. PCI > aliased devices (PCI bridge and all devices beneath it, VMD devices and > various devices quirked with pci_add_dma_alias()) must use the same > domain.

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-03 Thread Joerg Roedel
Hi Eric, On Tue, Mar 03, 2020 at 11:19:20AM +0100, Auger Eric wrote: > Michael has pushed this solution (putting the "configuration in the PCI > config space"), I think for those main reasons: > - ACPI may not be supported on some archs/hyps But on those there is device-tree, right? > - the

Re: Re: [PATCH v9 00/11] SMMUv3 Nested Stage Setup (VFIO part)

2020-03-03 Thread zhangfei
Hi, Eric On 2019/11/20 下午6:18, Auger Eric wrote: This series brings the VFIO part of HW nested paging support in the SMMUv3. The series depends on: [PATCH v9 00/14] SMMUv3 Nested Stage Setup (IOMMU part) (https://www.spinics.net/lists/kernel/msg3187714.html) 3 new IOCTLs are introduced that

Re: [PATCH v12 2/4] uacce: add uacce driver

2020-03-03 Thread Jean-Philippe Brucker
On Mon, Feb 24, 2020 at 10:22:02AM -0800, Raj, Ashok wrote: > Hi Kenneth, > > sorry for waking up late on this patchset. > > > On Wed, Jan 15, 2020 at 10:12:46PM +0800, Zhangfei Gao wrote: > [... trimmed] > > > + > > +static int uacce_fops_open(struct inode *inode, struct file *filep) > > +{ >

Re: [Patch v3 3/3] iommu: avoid taking iova_rbtree_lock twice

2020-03-03 Thread John Garry
On 21/01/2020 09:56, Robin Murphy wrote: On 18/12/2019 4:39 am, Cong Wang wrote: Both find_iova() and __free_iova() take iova_rbtree_lock, there is no reason to take and release it twice inside free_iova(). Fold them into one critical section by calling the unlock versions instead. Makes

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-03 Thread Auger Eric
Hi Joerg, On 3/2/20 5:16 PM, Joerg Roedel wrote: > On Fri, Feb 28, 2020 at 06:25:36PM +0100, Jean-Philippe Brucker wrote: >> This solution isn't elegant nor foolproof, but is the best we can do at >> the moment and works with existing virtio-iommu implementations. It also >> enables an IOMMU for