Re: [PATCH V2 5/5] DO NOT MERGE: iommu: disable list appending in dma-iommu

2020-09-07 Thread Christoph Hellwig
On Tue, Sep 08, 2020 at 06:36:19AM +0100, Christoph Hellwig wrote: > On Mon, Sep 07, 2020 at 09:18:50PM +0100, Tom Murphy wrote: > > Yeah we talked about passing an attr to map_sg to disable merging at > > the following microconfernce: > > https://linuxplumbersconf.org/event/7/contributions/846/ >

Re: [PATCH V2 5/5] DO NOT MERGE: iommu: disable list appending in dma-iommu

2020-09-07 Thread Christoph Hellwig
On Mon, Sep 07, 2020 at 09:18:50PM +0100, Tom Murphy wrote: > Yeah we talked about passing an attr to map_sg to disable merging at > the following microconfernce: > https://linuxplumbersconf.org/event/7/contributions/846/ > As far as I can remember everyone seemed happy with that solution. I >

Re: [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices when SME is active

2020-09-07 Thread Felix Kuehling
Am 2020-09-06 um 12:08 p.m. schrieb Deucher, Alexander: > [AMD Official Use Only - Internal Distribution Only] > >> -Original Message- >> From: Joerg Roedel >> Sent: Friday, September 4, 2020 6:06 AM >> To: Deucher, Alexander >> Cc: jroe...@suse.de; Kuehling, Felix ; >>

Re: [PATCH V2 5/5] DO NOT MERGE: iommu: disable list appending in dma-iommu

2020-09-07 Thread Tom Murphy
On Mon, 7 Sep 2020 at 08:00, Christoph Hellwig wrote: > > On Thu, Sep 03, 2020 at 09:18:37PM +0100, Tom Murphy wrote: > > Disable combining sg segments in the dma-iommu api. > > Combining the sg segments exposes a bug in the intel i915 driver which > > causes visual artifacts and the screen to

Re: [PATCH v16 00/20] iommu/arm-smmu + drm/msm: per-process GPU pgtables

2020-09-07 Thread Caleb Connolly
On 2020-09-01 17:46, Rob Clark wrote: > From: Rob Clark > > NOTE: I have re-ordered the series, and propose that we could merge this >series in the following order: > > 1) 01-11 - merge via drm / msm-next > 2) 12-15 - merge via iommu, no dependency on msm-next pull req >

Re: [PATCH v3 0/8] iommu/arm-smmu: Support maintaining bootloader mappings

2020-09-07 Thread Caleb Connolly
On 2020-09-04 16:55, Bjorn Andersson wrote: > Based on previous attempts and discussions this is the latest attempt at > inheriting stream mappings set up by the bootloader, for e.g. boot splash or > efifb. > > Per Will's request this builds on the work by Jordan and Rob for the Adreno > SMMU

Re: [PATCH v11 00/11] PCI: brcmstb: enable PCIe for STB chips

2020-09-07 Thread Florian Fainelli
On 9/7/2020 10:43 AM, Jim Quinlan wrote: On Mon, Sep 7, 2020 at 5:16 AM Lorenzo Pieralisi wrote: On Thu, Aug 27, 2020 at 09:29:59AM -0400, Jim Quinlan wrote: On Thu, Aug 27, 2020 at 2:35 AM Christoph Hellwig wrote: On Tue, Aug 25, 2020 at 10:40:27AM -0700, Florian Fainelli wrote: Hi,

Re: [PATCH v11 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-09-07 Thread Nicolas Saenz Julienne
On Mon, 2020-09-07 at 13:40 -0400, Jim Quinlan wrote: > On Mon, Sep 7, 2020 at 11:01 AM Nicolas Saenz Julienne > wrote: > > > > > > Hi Nicolas, > > > > > > Can you please help us out here? It appears that your commit > > > > It's dma_offset_from_dma_addr() that's causing trouble. It goes over

Re: [PATCH v11 00/11] PCI: brcmstb: enable PCIe for STB chips

2020-09-07 Thread Jim Quinlan via iommu
On Mon, Sep 7, 2020 at 5:16 AM Lorenzo Pieralisi wrote: > > On Thu, Aug 27, 2020 at 09:29:59AM -0400, Jim Quinlan wrote: > > On Thu, Aug 27, 2020 at 2:35 AM Christoph Hellwig wrote: > > > > > > On Tue, Aug 25, 2020 at 10:40:27AM -0700, Florian Fainelli wrote: > > > > Hi, > > > > > > > > On

Re: [PATCH v11 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-09-07 Thread Jim Quinlan via iommu
On Mon, Sep 7, 2020 at 11:01 AM Nicolas Saenz Julienne wrote: > > Hi Jim, sorry I'm a little late to the party, but was on vacation. > > On Thu, 2020-09-03 at 13:32 -0400, Jim Quinlan wrote: > > On Wed, Sep 2, 2020 at 8:52 PM Nathan Chancellor > > wrote: > > > On Wed, Sep 02, 2020 at 05:36:29PM

Re: [PATCH RESEND v9 09/13] iommu/arm-smmu-v3: Seize private ASID

2020-09-07 Thread Auger Eric
Hi Jean, On 8/17/20 7:15 PM, Jean-Philippe Brucker wrote: > The SMMU has a single ASID space, the union of shared and private ASID > sets. This means that the SMMU driver competes with the arch allocator > for ASIDs. Shared ASIDs are those of Linux processes, allocated by the > arch, and

[PATCH AUTOSEL 5.4 42/43] iommu/amd: Do not use IOMMUv2 functionality when SME is active

2020-09-07 Thread Sasha Levin
From: Joerg Roedel [ Upstream commit 2822e582501b65707089b097e773e6fd70774841 ] When memory encryption is active the device is likely not in a direct mapped domain. Forbid using IOMMUv2 functionality for now until finer grained checks for this have been implemented. Signed-off-by: Joerg Roedel

[PATCH AUTOSEL 4.19 25/26] iommu/amd: Do not use IOMMUv2 functionality when SME is active

2020-09-07 Thread Sasha Levin
From: Joerg Roedel [ Upstream commit 2822e582501b65707089b097e773e6fd70774841 ] When memory encryption is active the device is likely not in a direct mapped domain. Forbid using IOMMUv2 functionality for now until finer grained checks for this have been implemented. Signed-off-by: Joerg Roedel

[PATCH AUTOSEL 5.8 52/53] iommu/amd: Do not use IOMMUv2 functionality when SME is active

2020-09-07 Thread Sasha Levin
From: Joerg Roedel [ Upstream commit 2822e582501b65707089b097e773e6fd70774841 ] When memory encryption is active the device is likely not in a direct mapped domain. Forbid using IOMMUv2 functionality for now until finer grained checks for this have been implemented. Signed-off-by: Joerg Roedel

[PATCH AUTOSEL 5.8 51/53] iommu/amd: Do not force direct mapping when SME is active

2020-09-07 Thread Sasha Levin
From: Joerg Roedel [ Upstream commit 7cad554887f1c5fd77e57e6bf4be38370c2160cb ] Do not force devices supporting IOMMUv2 to be direct mapped when memory encryption is active. This might cause them to be unusable because their DMA mask does not include the encryption bit. Signed-off-by: Joerg

Re: [PATCH v5 0/3] iommu/arm-smmu-v3: permit users to disable msi polling

2020-09-07 Thread Will Deacon
On Thu, 27 Aug 2020 21:29:54 +1200, Barry Song wrote: > patch 1/3 and patch 2/3 are the preparation of patch 3/3 which permits users > to disable MSI-based polling by cmd line. > > -v5: > add Robin's reviewed-by > > -v4: > with respect to Robin's comments > * cleanup the code of the

Re: [PATCH] iommu/arm-smmu-v3: Fix l1 stream table size in the error message

2020-09-07 Thread Will Deacon
On Wed, 26 Aug 2020 22:17:58 +0800, Zenghui Yu wrote: > The actual size of level-1 stream table is l1size. This looks like an > oversight on commit d2e88e7c081ef ("iommu/arm-smmu: Fix LOG2SIZE setting > for 2-level stream tables") which forgot to update the @size in error > message as well. > >

Re: [PATCH v10 30/30] videobuf2: use sgtable-based scatterlist wrappers

2020-09-07 Thread Tomasz Figa
On Mon, Sep 7, 2020 at 4:02 PM Marek Szyprowski wrote: > > Hi Tomasz, > > On 07.09.2020 15:07, Tomasz Figa wrote: > > On Fri, Sep 4, 2020 at 3:35 PM Marek Szyprowski > > wrote: > >> Use recently introduced common wrappers operating directly on the struct > >> sg_table objects and scatterlist

Re: [PATCH v11 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-09-07 Thread Nicolas Saenz Julienne
Hi Christoph, a small fix to your fixes: On Tue, 2020-09-01 at 10:24 +0200, Christoph Hellwig wrote: > I've applied this to the dma-mapping tree. > > I had to resolve a conflict in drivers/of/address.c with a recent > mainline commit. I also applied the minor tweaks Andy pointed out > plus a

Re: [PATCH] iommu/sun50i: Fix set-but-not-used variable warning

2020-09-07 Thread Maxime Ripard
On Fri, Sep 04, 2020 at 01:39:06PM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > Fix the following warning the the SUN50I driver: > >drivers/iommu/sun50i-iommu.c: In function 'sun50i_iommu_irq': >drivers/iommu/sun50i-iommu.c:890:14: warning: variable 'iova' set but not > used

Re: [PATCH v11 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-09-07 Thread Nicolas Saenz Julienne
Hi Jim, sorry I'm a little late to the party, but was on vacation. On Thu, 2020-09-03 at 13:32 -0400, Jim Quinlan wrote: > On Wed, Sep 2, 2020 at 8:52 PM Nathan Chancellor > wrote: > > On Wed, Sep 02, 2020 at 05:36:29PM -0700, Florian Fainelli wrote: > > > > > > On 9/2/2020 3:38 PM, Nathan

Re: [PATCH v10 30/30] videobuf2: use sgtable-based scatterlist wrappers

2020-09-07 Thread Marek Szyprowski
Hi Tomasz, On 07.09.2020 15:07, Tomasz Figa wrote: > On Fri, Sep 4, 2020 at 3:35 PM Marek Szyprowski > wrote: >> Use recently introduced common wrappers operating directly on the struct >> sg_table objects and scatterlist page iterators to make the code a bit >> more compact, robust, easier to

Re: [PATCH v10 30/30] videobuf2: use sgtable-based scatterlist wrappers

2020-09-07 Thread Tomasz Figa
Hi Marek, On Fri, Sep 4, 2020 at 3:35 PM Marek Szyprowski wrote: > > Use recently introduced common wrappers operating directly on the struct > sg_table objects and scatterlist page iterators to make the code a bit > more compact, robust, easier to follow and copy/paste safe. > > No functional

Re: [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices when SME is active

2020-09-07 Thread Christian König
Am 07.09.20 um 12:44 schrieb Joerg Roedel: On Sun, Sep 06, 2020 at 04:08:58PM +, Deucher, Alexander wrote: From f479b9da353c2547c26ebac8930a5dcd9a134eb7 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Sun, 6 Sep 2020 12:05:12 -0400 Subject: [PATCH] drm/amdgpu: Fail to load on RAVEN if

Re: [PATCH v7 9/9] x86/mmu: Allocate/free PASID

2020-09-07 Thread Borislav Petkov
On Thu, Aug 27, 2020 at 08:06:34AM -0700, Fenghua Yu wrote: > A PASID is allocated for an "mm" the first time any thread binds > to an SVM capable device and is freed from the "mm" when the SVM is > unbound by the last thread. It's possible for the "mm" to have different > PASID values in

Re: [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices when SME is active

2020-09-07 Thread Joerg Roedel
On Sun, Sep 06, 2020 at 04:08:58PM +, Deucher, Alexander wrote: > From f479b9da353c2547c26ebac8930a5dcd9a134eb7 Mon Sep 17 00:00:00 2001 > From: Alex Deucher > Date: Sun, 6 Sep 2020 12:05:12 -0400 > Subject: [PATCH] drm/amdgpu: Fail to load on RAVEN if SME is active > > Due to hardware bugs,

Re: [PATCH v7 8/9] x86/cpufeatures: Mark ENQCMD as disabled when configured out

2020-09-07 Thread Borislav Petkov
On Thu, Aug 27, 2020 at 08:06:33AM -0700, Fenghua Yu wrote: > Currently the ENQCMD feature cannot be used if CONFIG_INTEL_IOMMU_SVM > is not set. IOW, "Currently, the ENQCMD feature depends on CONFIG_INTEL_IOMMU_SVM." ? No need for a "cannot ... if not" formulation. -- Regards/Gruss,

[PATCH v4 1/3] dt-bindings: iommu: Add binding for MediaTek MT8167 IOMMU

2020-09-07 Thread Fabien Parent
This commit adds IOMMU binding documentation and larb port definitions for the MT8167 SoC. Signed-off-by: Fabien Parent Acked-by: Rob Herring --- V4: * Added path to mt8167 larb header file * Added Honghui Zhang in copyright header V3: Added mt8167-larb-port.h file for iommu

[PATCH v4 2/3] iommu/mediatek: add flag for legacy ivrp paddr

2020-09-07 Thread Fabien Parent
Add a new flag in order to select which IVRP_PADDR format is used by an SoC. Signed-off-by: Fabien Parent Reviewed-by: Yong Wu --- v4: no change v3: set LEGACY_IVRP_PADDR as a flag instead of platform data v2: new patch --- drivers/iommu/mtk_iommu.c | 6 -- 1 file changed, 4

[PATCH v4 3/3] iommu/mediatek: add support for MT8167

2020-09-07 Thread Fabien Parent
Add support for the IOMMU on MT8167 Signed-off-by: Fabien Parent --- V4; * Removed HAS_4GB_MODE flag since this SoC does not seem to support it V3: * use LEGACY_IVRP_PADDR flag instead of using a platform data member V2: * removed if based on m4u_plat, and using instead

Re: [PATCH v3 3/3] iommu/mediatek: add support for MT8167

2020-09-07 Thread Fabien Parent
> > +static const struct mtk_iommu_plat_data mt8167_data = { > > + .m4u_plat = M4U_MT8167, > > + .flags= HAS_4GB_MODE | RESET_AXI | HAS_LEGACY_IVRP_PADDR, > > The 4GB mode flow was improved at[1] which has just been applied. > > If you add 4gb_mode flag but don't have

Re: [PATCH v11 00/11] PCI: brcmstb: enable PCIe for STB chips

2020-09-07 Thread Lorenzo Pieralisi
On Thu, Aug 27, 2020 at 09:29:59AM -0400, Jim Quinlan wrote: > On Thu, Aug 27, 2020 at 2:35 AM Christoph Hellwig wrote: > > > > On Tue, Aug 25, 2020 at 10:40:27AM -0700, Florian Fainelli wrote: > > > Hi, > > > > > > On 8/24/2020 12:30 PM, Jim Quinlan wrote: > > >> > > >> Patchset Summary: > > >>

Re: [PATCH v2 3/9] iommu/ioasid: Introduce ioasid_set APIs

2020-09-07 Thread Auger Eric
Hi Jacob, On 9/3/20 11:07 PM, Jacob Pan wrote: > On Tue, 1 Sep 2020 13:51:26 +0200 > Auger Eric wrote: > >> Hi Jacob, >> >> On 8/22/20 6:35 AM, Jacob Pan wrote: >>> ioasid_set was introduced as an arbitrary token that are shared by >>> a >> that is > got it > >>> group of IOASIDs. For

Re: [PATCH v2 1/9] docs: Document IO Address Space ID (IOASID) APIs

2020-09-07 Thread Auger Eric
Hi Jacob, On 9/1/20 6:56 PM, Jacob Pan wrote: > Hi Eric, > > On Thu, 27 Aug 2020 18:21:07 +0200 > Auger Eric wrote: > >> Hi Jacob, >> On 8/24/20 12:32 PM, Jean-Philippe Brucker wrote: >>> On Fri, Aug 21, 2020 at 09:35:10PM -0700, Jacob Pan wrote: IOASID is used to identify address

Re: [PATCH V2 5/5] DO NOT MERGE: iommu: disable list appending in dma-iommu

2020-09-07 Thread Christoph Hellwig
On Thu, Sep 03, 2020 at 09:18:37PM +0100, Tom Murphy wrote: > Disable combining sg segments in the dma-iommu api. > Combining the sg segments exposes a bug in the intel i915 driver which > causes visual artifacts and the screen to freeze. This is most likely > because of how the i915 handles the