Re: [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-14 Thread Tomasz Figa
On Thu, Feb 15, 2018 at 12:17 PM, Tomasz Figa wrote: > On Thu, Feb 15, 2018 at 1:03 AM, Robin Murphy wrote: >> On 14/02/18 10:33, Vivek Gautam wrote: >>> >>> On Wed, Feb 14, 2018 at 2:46 PM, Tomasz Figa wrote: >>> >>> Adding Jordan to this thread as well. >>> On Wed, Feb 14, 2018 at 6:13 PM

Re: [Freedreno] [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-14 Thread Tomasz Figa
On Thu, Feb 15, 2018 at 1:12 AM, Rob Clark wrote: > On Wed, Feb 14, 2018 at 10:48 AM, Jordan Crouse > wrote: >> On Wed, Feb 14, 2018 at 12:31:29PM +0900, Tomasz Figa wrote: >>> >>> - When submitting commands to the GPU, the GPU driver will >>> pm_runtime_get_sync() on the GPU device, which will

Re: [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-14 Thread Tomasz Figa
On Thu, Feb 15, 2018 at 1:03 AM, Robin Murphy wrote: > On 14/02/18 10:33, Vivek Gautam wrote: >> >> On Wed, Feb 14, 2018 at 2:46 PM, Tomasz Figa wrote: >> >> Adding Jordan to this thread as well. >> >>> On Wed, Feb 14, 2018 at 6:13 PM, Vivek Gautam >>> wrote: Hi Tomasz, On We

[PATCH v2] iommu/amd: Avoid locking get_irq_table() from atomic context

2018-02-14 Thread Scott Wood
get_irq_table() previously acquired amd_iommu_devtable_lock which is not a raw lock, and thus cannot be acquired from atomic context on PREEMPT_RT. Many calls to modify_irte*() come from atomic context due to the IRQ desc->lock, as does amd_iommu_update_ga() due to the preemption disabling in vcpu

Re: [PATCH 08/37] iommu/fault: Handle mm faults

2018-02-14 Thread Jacob Pan
On Mon, 12 Feb 2018 18:33:23 + Jean-Philippe Brucker wrote: > When a recoverable page fault is handled by the fault workqueue, find > the associated mm and call handle_mm_fault. > > Signed-off-by: Jean-Philippe Brucker > --- > drivers/iommu/io-pgfault.c | 89 > +

Re: [Freedreno] [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-14 Thread Rob Clark
On Wed, Feb 14, 2018 at 10:48 AM, Jordan Crouse wrote: > On Wed, Feb 14, 2018 at 12:31:29PM +0900, Tomasz Figa wrote: >> >> - When submitting commands to the GPU, the GPU driver will >> pm_runtime_get_sync() on the GPU device, which will automatically do >> the same on all the linked suppliers, wh

Re: [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-14 Thread Robin Murphy
On 14/02/18 10:33, Vivek Gautam wrote: On Wed, Feb 14, 2018 at 2:46 PM, Tomasz Figa wrote: Adding Jordan to this thread as well. On Wed, Feb 14, 2018 at 6:13 PM, Vivek Gautam wrote: Hi Tomasz, On Wed, Feb 14, 2018 at 11:08 AM, Tomasz Figa wrote: On Wed, Feb 14, 2018 at 1:17 PM, Vivek Gau

Re: [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-14 Thread Jordan Crouse
On Wed, Feb 14, 2018 at 12:31:29PM +0900, Tomasz Figa wrote: > Hi Jordan, > > On Wed, Feb 14, 2018 at 1:42 AM, Jordan Crouse wrote: > > On Tue, Feb 13, 2018 at 06:10:38PM +0900, Tomasz Figa wrote: > >> Hi Vivek, > >> > >> Thanks for the patch. Please see my comments inline. > >> > >> On Wed, Feb

Re: [PATCH 4/4] vfio: Allow type-1 IOMMU instantiation with a virtio-iommu

2018-02-14 Thread Robin Murphy
On 14/02/18 15:26, Alex Williamson wrote: On Wed, 14 Feb 2018 14:53:40 + Jean-Philippe Brucker wrote: When enabling both VFIO and VIRTIO_IOMMU modules, automatically select VFIO_IOMMU_TYPE1 as well. Signed-off-by: Jean-Philippe Brucker --- drivers/vfio/Kconfig | 2 +- 1 file changed,

Re: [PATCH 4/4] vfio: Allow type-1 IOMMU instantiation with a virtio-iommu

2018-02-14 Thread Alex Williamson
On Wed, 14 Feb 2018 14:53:40 + Jean-Philippe Brucker wrote: > When enabling both VFIO and VIRTIO_IOMMU modules, automatically select > VFIO_IOMMU_TYPE1 as well. > > Signed-off-by: Jean-Philippe Brucker > --- > drivers/vfio/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [PATCH] iommu/amd - Use dev_err to send events to the system log

2018-02-14 Thread Hook, Gary
On 2/14/2018 6:49 AM, Joerg Roedel wrote: On Tue, Feb 13, 2018 at 02:24:56PM -0500, Hook, Gary wrote: Without actually running a driver and getting some debug info, I'll just say that my example compiled, the amd_iommu structure points to a pci_dev which contains a device, and the two possibilit

[PATCH 4/4] vfio: Allow type-1 IOMMU instantiation with a virtio-iommu

2018-02-14 Thread Jean-Philippe Brucker
When enabling both VFIO and VIRTIO_IOMMU modules, automatically select VFIO_IOMMU_TYPE1 as well. Signed-off-by: Jean-Philippe Brucker --- drivers/vfio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vfio/Kconfig b/drivers/vfio/Kconfig index c84333eb5eb5..65a1e

[PATCH 3/4] iommu/virtio: Add event queue

2018-02-14 Thread Jean-Philippe Brucker
The event queue offers a way for the device to report access faults from endpoints. It is implemented on virtqueue #1. Whenever the host needs to signal a fault, it fills one of the buffers offered by the guest and interrupts it. Signed-off-by: Jean-Philippe Brucker --- drivers/iommu/virtio-iomm

[PATCH 2/4] iommu/virtio: Add probe request

2018-02-14 Thread Jean-Philippe Brucker
When the device offers the probe feature, send a probe request for each device managed by the IOMMU. Extract RESV_MEM information. When we encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region. This will tell other subsystems that there is no need to map the MSI doorbell in the virt

[PATCH 1/4] iommu: Add virtio-iommu driver

2018-02-14 Thread Jean-Philippe Brucker
The virtio IOMMU is a para-virtualized device, allowing to send IOMMU requests such as map/unmap over virtio-mmio transport without emulating page tables. This implementation handles ATTACH, DETACH, MAP and UNMAP requests. The bulk of the code transforms calls coming from the IOMMU API into corres

[PATCH 0/4] Add virtio-iommu driver

2018-02-14 Thread Jean-Philippe Brucker
Implement the virtio-iommu driver following version 0.6 of the specification [1]. Previous version, RFCv2, was sent in November [2]. This version addresses Eric's comments and changes the device number. (Since last week I also tested and fixed the probe/release functions, they now use devm properly

Re: [PATCH v13 0/2] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2018-02-14 Thread Joerg Roedel
On Tue, Feb 13, 2018 at 03:20:49PM +, Shameer Kolothum wrote: > Shameerali Kolothum Thodi (2): > ACPI/IORT: Add msi address regions reservation helper > iommu/dma: Add HW MSI(GICv3 ITS) address regions reservation Okay, the patches look good to me. I plan to queue them into the IOMMU tree

Re: [PATCH] iommu/amd - Use dev_err to send events to the system log

2018-02-14 Thread Joerg Roedel
On Tue, Feb 13, 2018 at 02:24:56PM -0500, Hook, Gary wrote: > Without actually running a driver and getting some debug info, I'll just > say that my example compiled, the amd_iommu structure points to a pci_dev > which contains a device, and the two possibilities are likely equivalent. > > I'll ve

Re: [PATCH v5 08/13] iommu/rockchip: Control clocks needed to access the IOMMU

2018-02-14 Thread Tomasz Figa via iommu
On Wed, Feb 14, 2018 at 7:03 PM, Vivek Gautam wrote: > > > On 1/24/2018 7:19 PM, Robin Murphy wrote: >> >> On 24/01/18 10:35, Jeffy Chen wrote: >>> >>> From: Tomasz Figa >>> >>> Current code relies on master driver enabling necessary clocks before >>> IOMMU is accessed, however there are cases wh

Re: [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-14 Thread Vivek Gautam
On Wed, Feb 14, 2018 at 2:46 PM, Tomasz Figa wrote: Adding Jordan to this thread as well. > On Wed, Feb 14, 2018 at 6:13 PM, Vivek Gautam > wrote: >> Hi Tomasz, >> >> On Wed, Feb 14, 2018 at 11:08 AM, Tomasz Figa wrote: >>> On Wed, Feb 14, 2018 at 1:17 PM, Vivek Gautam >>> wrote: Hi Toma

Re: Kdump kernel hang when set amd_iommu=off

2018-02-14 Thread Baoquan He
Hi Joerg, On 02/13/18 at 02:25pm, Joerg Roedel wrote: > Hi Baoquan, > > On Fri, Jan 26, 2018 at 04:06:22PM +0800, Baoquan He wrote: > > Saw Huawei's bug report about kdump kernel hang when intel_iommu=off > > is set. I met the similar problem in amd system, only set amd_iommu=off > > in kdump ke

Re: [PATCH v5 08/13] iommu/rockchip: Control clocks needed to access the IOMMU

2018-02-14 Thread Vivek Gautam
On 1/24/2018 7:19 PM, Robin Murphy wrote: On 24/01/18 10:35, Jeffy Chen wrote: From: Tomasz Figa Current code relies on master driver enabling necessary clocks before IOMMU is accessed, however there are cases when the IOMMU should be accessed while the master is not running yet, for example

Re: [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-14 Thread Tomasz Figa
On Wed, Feb 14, 2018 at 6:13 PM, Vivek Gautam wrote: > Hi Tomasz, > > On Wed, Feb 14, 2018 at 11:08 AM, Tomasz Figa wrote: >> On Wed, Feb 14, 2018 at 1:17 PM, Vivek Gautam >> wrote: >>> Hi Tomasz, >>> >>> On Wed, Feb 14, 2018 at 8:31 AM, Tomasz Figa wrote: On Wed, Feb 14, 2018 at 11:13 AM,

Re: [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-14 Thread Vivek Gautam
Hi Tomasz, On Wed, Feb 14, 2018 at 11:08 AM, Tomasz Figa wrote: > On Wed, Feb 14, 2018 at 1:17 PM, Vivek Gautam > wrote: >> Hi Tomasz, >> >> On Wed, Feb 14, 2018 at 8:31 AM, Tomasz Figa wrote: >>> On Wed, Feb 14, 2018 at 11:13 AM, Rob Clark wrote: On Tue, Feb 13, 2018 at 8:59 PM, Tomasz F

Re: [PATCH v7 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2018-02-14 Thread Vivek Gautam
Hi Tomasz, On Tue, Feb 13, 2018 at 1:54 PM, Tomasz Figa wrote: > Hi Vivek, > > Thanks for the patch. Please see my comments inline. > > On Wed, Feb 7, 2018 at 7:31 PM, Vivek Gautam > wrote: >> From: Sricharan R >> >> The smmu device probe/remove and add/remove master device callbacks >> gets c

Re: [PATCH v7 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2018-02-14 Thread Vivek Gautam
On Tue, Feb 13, 2018 at 7:22 PM, Tomasz Figa wrote: > On Tue, Feb 13, 2018 at 9:57 PM, Robin Murphy wrote: >> On 13/02/18 08:24, Tomasz Figa wrote: >>> >>> Hi Vivek, >>> >>> Thanks for the patch. Please see my comments inline. >>> >>> On Wed, Feb 7, 2018 at 7:31 PM, Vivek Gautam >>> wrote: