[PATCH] iommu/vt-d: don't over-free page table directories

2017-01-30 Thread David Dillow via iommu
dma_pte_free_level() recurses down the IOMMU page tables and frees directory pages that are entirely contained in the given PFN range. Unfortunately, it incorrectly calculates the starting address covered by the PTE under consideration, which can lead to it clearing an entry that is still in use.

Re: [PATCH v2 2/3] iommu/ipmmu-vmsa: Increase maximum micro-TLBS to 48

2017-01-30 Thread Magnus Damm
Hi Joerg, On Fri, Jan 27, 2017 at 8:47 PM, Joerg Roedel wrote: > On Mon, Jan 23, 2017 at 08:40:29PM +0900, Magnus Damm wrote: >> From: Magnus Damm >> >> Bump up the maximum numbers of micro-TLBS to 48. >> >> Each IPMMU device instance get micro-TLB

Re: [RFC 1/3] iommu/arm-smmu: Add support to opt-in to stalling

2017-01-30 Thread Rob Clark
On Thu, Jan 12, 2017 at 10:17 AM, Will Deacon wrote: > On Wed, Jan 11, 2017 at 03:59:30PM -0500, Rob Clark wrote: >> On Wed, Jan 11, 2017 at 4:36 AM, Will Deacon wrote: >> > On Tue, Jan 10, 2017 at 02:20:13PM -0500, Rob Clark wrote: >> >> On Tue, Jan 10,

Re: [PATCH V7 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-01-30 Thread Sinan Kaya
On 1/30/2017 11:51 AM, Lorenzo Pieralisi wrote: > On Mon, Jan 30, 2017 at 10:46:39AM -0500, Sinan Kaya wrote: >> On 1/30/2017 9:54 AM, Nate Watterson wrote: >>> On 2017-01-30 09:38, Will Deacon wrote: On Mon, Jan 30, 2017 at 09:33:50AM -0500, Sinan Kaya wrote: > On 1/30/2017 9:23 AM, Nate

Re: [PATCH V7 01/11] iommu/of: Refactor of_iommu_configure() for error handling

2017-01-30 Thread Robin Murphy
On 30/01/17 07:00, Sricharan wrote: > Hi Robin, > >>> [..] >>> >> +const struct iommu_ops *of_iommu_configure(struct device *dev, >> + struct device_node *master_np) >> +{ >> +const struct iommu_ops *ops; >> + >> +if (!master_np) >> +

[PATCH 2/2] iommu/vt-d: tylersburg isoch identity map check is done too late.

2017-01-30 Thread Ashok Raj
The check to set identity map for tylersburg is done too late. It needs to be done before the check for identity_map domain is done. To: Joerg Roedel To: David Woodhouse Cc: iommu@lists.linux-foundation.org Cc: linux-ker...@vger.kernel.org Cc:

[PATCH 1/2] iommu/vt-d: Fix some macros that are incorrectly specified in intel-iommu

2017-01-30 Thread Ashok Raj
From: CQ Tang Some of the macros are incorrect with wrong bit-shifts resulting in picking the incorrect invalidation granularity. Incorrect Source-ID in extended devtlb invalidation caused device side errors. To: Joerg Roedel To: David Woodhouse

Re: [PATCH V7 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-01-30 Thread Lorenzo Pieralisi
On Mon, Jan 30, 2017 at 10:46:39AM -0500, Sinan Kaya wrote: > On 1/30/2017 9:54 AM, Nate Watterson wrote: > > On 2017-01-30 09:38, Will Deacon wrote: > >> On Mon, Jan 30, 2017 at 09:33:50AM -0500, Sinan Kaya wrote: > >>> On 1/30/2017 9:23 AM, Nate Watterson wrote: > >>> > On 2017-01-30 08:59,

Re: [PATCH V7 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-01-30 Thread Sinan Kaya
On 1/30/2017 9:54 AM, Nate Watterson wrote: > On 2017-01-30 09:38, Will Deacon wrote: >> On Mon, Jan 30, 2017 at 09:33:50AM -0500, Sinan Kaya wrote: >>> On 1/30/2017 9:23 AM, Nate Watterson wrote: >>> > On 2017-01-30 08:59, Sinan Kaya wrote: >>> >> On 1/30/2017 7:22 AM, Robin Murphy wrote: >>> >>>

Re: [PATCH v2 1/2] iommu/dma: Stop getting dma_32bit_pfn wrong

2017-01-30 Thread Joerg Roedel
On Mon, Jan 16, 2017 at 01:24:54PM +, Robin Murphy wrote: > iommu_dma_init_domain() was originally written under the misconception > that dma_32bit_pfn represented some sort of size limit for IOVA domains. > Since the truth is almost the exact opposite of that, rework the logic > and comments

Re: [PATCH 1/2] iommu/vt-d: Fix some macros that are incorrectly specified in intel-iommu

2017-01-30 Thread Joerg Roedel
Hi Ashok, On Fri, Jan 27, 2017 at 08:32:39AM -0800, Ashok Raj wrote: > From: CQ Tang > > Some of the macros are incorrect with wrong bit-shifts resulting in picking > the incorrect invalidation granularity. Incorrect Source-ID in extended > devtlb invalidation caused device

Re: [GIT PULL] iommu: IOMMU_PRIV support for 4.11

2017-01-30 Thread Joerg Roedel
On Fri, Jan 27, 2017 at 04:46:21PM +, Will Deacon wrote: > The following changes since commit a121103c922847ba5010819a3f250f1f7fc84ab8: > > Linux 4.10-rc3 (2017-01-08 14:18:17 -0800) > > are available in the git repository at: > >

Re: [GIT PULL] iommu/arm-smmu: Updates for 4.11

2017-01-30 Thread Joerg Roedel
On Fri, Jan 27, 2017 at 04:44:21PM +, Will Deacon wrote: > The following changes since commit a121103c922847ba5010819a3f250f1f7fc84ab8: > > Linux 4.10-rc3 (2017-01-08 14:18:17 -0800) > > are available in the git repository at: > >

Re: [GIT PULL] iommu: KVM PCIe/MSI passthrough on ARM/ARM64 for 4.11

2017-01-30 Thread Joerg Roedel
On Fri, Jan 27, 2017 at 04:50:22PM +, Will Deacon wrote: > Hi Joerg, > > Please pull Eric's guest-MSI series for 4.11. This has been through > considerable review and associated rework (including a session at LPC), > but it has stabilised at last and we all seem to be happy with it. Eric's >

Re: [PATCH V7 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-01-30 Thread Nate Watterson
On 2017-01-30 09:38, Will Deacon wrote: On Mon, Jan 30, 2017 at 09:33:50AM -0500, Sinan Kaya wrote: On 1/30/2017 9:23 AM, Nate Watterson wrote: > On 2017-01-30 08:59, Sinan Kaya wrote: >> On 1/30/2017 7:22 AM, Robin Murphy wrote: >>> On 29/01/17 17:53, Sinan Kaya wrote: On 1/24/2017 7:37

Re: [PATCH V7 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-01-30 Thread Will Deacon
On Mon, Jan 30, 2017 at 09:33:50AM -0500, Sinan Kaya wrote: > On 1/30/2017 9:23 AM, Nate Watterson wrote: > > On 2017-01-30 08:59, Sinan Kaya wrote: > >> On 1/30/2017 7:22 AM, Robin Murphy wrote: > >>> On 29/01/17 17:53, Sinan Kaya wrote: > On 1/24/2017 7:37 AM, Lorenzo Pieralisi wrote: >

Re: [PATCH V7 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-01-30 Thread Sinan Kaya
On 1/30/2017 9:23 AM, Nate Watterson wrote: > On 2017-01-30 08:59, Sinan Kaya wrote: >> On 1/30/2017 7:22 AM, Robin Murphy wrote: >>> On 29/01/17 17:53, Sinan Kaya wrote: On 1/24/2017 7:37 AM, Lorenzo Pieralisi wrote: > [+hanjun, tomasz, sinan] > > It is quite a key patchset, I

Re: [PATCH V7 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-01-30 Thread Nate Watterson
On 2017-01-30 08:59, Sinan Kaya wrote: On 1/30/2017 7:22 AM, Robin Murphy wrote: On 29/01/17 17:53, Sinan Kaya wrote: On 1/24/2017 7:37 AM, Lorenzo Pieralisi wrote: [+hanjun, tomasz, sinan] It is quite a key patchset, I would be glad if they can test on their respective platforms with

Re: [PATCH V7 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-01-30 Thread Sinan Kaya
On 1/30/2017 7:22 AM, Robin Murphy wrote: > On 29/01/17 17:53, Sinan Kaya wrote: >> On 1/24/2017 7:37 AM, Lorenzo Pieralisi wrote: >>> [+hanjun, tomasz, sinan] >>> >>> It is quite a key patchset, I would be glad if they can test on their >>> respective platforms with IORT. >>> >> >> Tested on top

Re: [PATCH V7 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-01-30 Thread Robin Murphy
On 29/01/17 17:53, Sinan Kaya wrote: > On 1/24/2017 7:37 AM, Lorenzo Pieralisi wrote: >> [+hanjun, tomasz, sinan] >> >> It is quite a key patchset, I would be glad if they can test on their >> respective platforms with IORT. >> > > Tested on top of 4.10-rc5. > > 1.Platform Hidma device

Re: [PATCH/RFC] iommu/dma: Per-domain flag to control size-alignment

2017-01-30 Thread Robin Murphy
On 30/01/17 07:20, Yoshihiro Shimoda wrote: > Hi Robin, Magnus, > >> -Original Message- >> From: Robin Murphy >> Sent: Saturday, January 28, 2017 2:38 AM >> >> Hi Magnus, >> >> On 27/01/17 06:24, Magnus Damm wrote: >>> From: Magnus Damm >>> >>> Introduce the

RE: [PATCH V7 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-01-30 Thread Sricharan
Hi, >-Original Message- >From: linux-arm-kernel [mailto:linux-arm-kernel-boun...@lists.infradead.org] >On Behalf Of Sinan Kaya >Sent: Sunday, January 29, 2017 10:06 PM >To: Sricharan R ; robin.mur...@arm.com; >will.dea...@arm.com; j...@8bytes.org;

RE: [PATCH V7 00/11] IOMMU probe deferral support

2017-01-30 Thread Sricharan
Hi Bjorn, >On Mon, Jan 23, 2017 at 09:48:02PM +0530, Sricharan R wrote: >> This series calls the dma ops configuration for the devices >> at a generic place so that it works for all busses. >> The dma_configure_ops for a device is now called during >> the device_attach callback just before the

RE: [PATCH V7 10/11] iommu/arm-smmu: Clean up early-probing workarounds

2017-01-30 Thread Sricharan
>> Now that the appropriate ordering is enforced via profe-deferral of > >s/profe-deferral/probe-deferral/ > ha, will change it. Regards, Sricharan >> masters in core code, rip it all out and bask in the simplicity. >> >> Acked-by: Will Deacon >> Signed-off-by: Robin

RE: [PATCH V7 09/11] arm64: dma-mapping: Remove the notifier trick to handle early setting of dma_ops

2017-01-30 Thread Sricharan
>> With arch_setup_dma_ops now being called late during device's probe after >> the device's iommu is probed, the notifier trick required to handle the >> early setup of dma_ops before the iommu group gets created is not >> required. So removing the notifier's here. > >s/notifier's/notifiers/ >