Re: [PATCH 1/3] memory: mediatek: Add a new interface mtk_smi_larb_is_ready

2016-07-25 Thread Yong Wu
On Mon, 2016-07-25 at 10:39 +0200, Matthias Brugger wrote: > > On 20/07/16 05:01, Yong Wu wrote: > > Currently the iommu consumer always call iommu_present to get whether > > the iommu is ready. But in MTK IOMMU, this function can't indicate > > this. The IOMMU call

Re: [RFC PATCH v3 00/13] ACPI IORT ARM SMMU v3 support

2016-07-25 Thread Dennis Chen
On Mon, Jul 25, 2016 at 09:36:41AM +0100, Lorenzo Pieralisi wrote: > On Mon, Jul 25, 2016 at 01:53:32PM +0800, Dennis Chen wrote: > > Hi > > On Wed, Jul 20, 2016 at 12:23:22PM +0100, Lorenzo Pieralisi wrote: > > > This RFC patch series is v3 of a previous posting: > > > > > >

[PATCH v4 4/6] arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED

2016-07-25 Thread Mitchel Humpherys
The newly added DMA_ATTR_PRIVILEGED is useful for creating mappings that are only accessible to privileged DMA engines. Implement it in dma-iommu.c so that the ARM64 DMA IOMMU mapper can make use of it. Signed-off-by: Mitchel Humpherys --- Notes: v3..v4

[PATCH v4 0/6] Add support for privileged mappings

2016-07-25 Thread Mitchel Humpherys
The following patch to the ARM SMMU driver: commit d346180e70b91b3d5a1ae7e5603e65593d4622bc Author: Robin Murphy Date: Tue Jan 26 18:06:34 2016 + iommu/arm-smmu: Treat all device transactions as unprivileged started forcing all SMMU

[PATCH v4 5/6] dmaengine: pl330: Make sure microcode is privileged

2016-07-25 Thread Mitchel Humpherys
The PL330 performs privileged instruction fetches. This can result in SMMU permission faults on SMMUs that implement the ARMv8 VMSA, which specifies that mappings that are writeable at one execution level shall not be executable at any higher-privileged level. Fix this by using the

[PATCH v4 6/6] Revert "iommu/arm-smmu: Treat all device transactions as unprivileged"

2016-07-25 Thread Mitchel Humpherys
This reverts commit d346180e70b9 ("iommu/arm-smmu: Treat all device transactions as unprivileged") since some platforms actually make use of privileged transactions. Signed-off-by: Mitchel Humpherys --- Notes: v2..v3 - Moved to the end of the series.

[PATCH v4 3/6] common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute

2016-07-25 Thread Mitchel Humpherys
This patch adds the DMA_ATTR_PRIVILEGED attribute to the DMA-mapping subsystem. Some advanced peripherals such as remote processors and GPUs perform accesses to DMA buffers in both privileged "supervisor" and unprivileged "user" modes. This attribute is used to indicate to the DMA-mapping

[PATCH v4 2/6] iommu/io-pgtable-arm: add support for the IOMMU_PRIV flag

2016-07-25 Thread Mitchel Humpherys
From: Jeremy Gebben Allow the creation of privileged mode mappings, for stage 1 only. Signed-off-by: Jeremy Gebben --- Notes: v2..v3 - Use existing bit definitions. drivers/iommu/io-pgtable-arm.c | 5 - 1 file changed, 4

[PATCH v4 1/6] iommu: add IOMMU_PRIV attribute

2016-07-25 Thread Mitchel Humpherys
Add the IOMMU_PRIV attribute, which is used to indicate privileged mappings. Signed-off-by: Mitchel Humpherys --- Notes: v2..v3 - Added comment include/linux/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/iommu.h

Re: [PATCH v3 0/6] Add support for privileged mappings

2016-07-25 Thread Mitchel Humpherys
On Mon, Jul 25 2016 at 10:50:13 AM, Will Deacon wrote: > On Fri, Jul 22, 2016 at 01:39:45PM -0700, Mitchel Humpherys wrote: >> On Fri, Jul 22 2016 at 05:51:07 PM, Will Deacon wrote: >> > On Tue, Jul 19, 2016 at 01:36:49PM -0700, Mitchel Humpherys wrote:

Re: [PATCH v11 10/10] genirq/msi: use the MSI doorbell's IOVA when requested

2016-07-25 Thread Auger Eric
Hi Thomas, On 20/07/2016 11:09, Thomas Gleixner wrote: > On Tue, 19 Jul 2016, Eric Auger wrote: > > First of all - valid for all patches: > > Subject: sys/subsys: Sentence starts with an uppercase letter OK understood. > > Now for this particular one: > > genirq/msi: use the MSI doorbell's

Re: [PATCH v11 09/10] genirq/msi: map/unmap the MSI doorbells on msi_domain_alloc/free_irqs

2016-07-25 Thread Auger Eric
Hi Thomas, On 20/07/2016 11:04, Thomas Gleixner wrote: > On Tue, 19 Jul 2016, Eric Auger wrote: >> /** >> + * msi_handle_doorbell_mappings: in case the irq data corresponds to an >> + * MSI that requires iommu mapping, traverse the irq domain hierarchy >> + * to retrieve the doorbells to handle

Re: [RFC PATCH v3 05/13] drivers: iommu: make iommu_fwspec OF agnostic

2016-07-25 Thread Robin Murphy
Hi Lorenzo, On 20/07/16 12:23, Lorenzo Pieralisi wrote: > The iommu_fwspec structure, used to hold per device iommu configuration > data is not OF specific and therefore can be moved to a generic > and OF independent compilation unit. > > In particular, the iommu_fwspec handling hinges on the

Re: [PATCH v3 0/6] Add support for privileged mappings

2016-07-25 Thread Will Deacon
On Fri, Jul 22, 2016 at 01:39:45PM -0700, Mitchel Humpherys wrote: > On Fri, Jul 22 2016 at 05:51:07 PM, Will Deacon wrote: > > On Tue, Jul 19, 2016 at 01:36:49PM -0700, Mitchel Humpherys wrote: > >> The following patch to the ARM SMMU driver: > >> > >> commit

Re: [PATCH 1/3] memory: mediatek: Add a new interface mtk_smi_larb_is_ready

2016-07-25 Thread Matthias Brugger
On 20/07/16 05:01, Yong Wu wrote: Currently the iommu consumer always call iommu_present to get whether the iommu is ready. But in MTK IOMMU, this function can't indicate this. The IOMMU call bus_set_iommu->mtk_iommu_add_device-> mtk_iommu_attach_device to parse the iommu data, then it's able

Re: [PATCH v11 4/8] vfio/type1: handle unmap/unpin and replay for VFIO_IOVA_RESERVED slots

2016-07-25 Thread Auger Eric
Hi, On 24/07/2016 03:41, kbuild test robot wrote: > Hi, > > [auto build test ERROR on vfio/next] > [also build test ERROR on v4.7-rc7 next-20160722] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: >