Re: [PATCH v2] iommu/vt-d: respect max guest address width in agaw

2018-11-08 Thread Joerg Roedel
On Wed, Nov 07, 2018 at 02:12:25PM -0800, Jacob Pan wrote: > We have found some issues with this patch on some platforms. Please > disregard this patch. Patch dropped. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.

Re: [PATCH -next] iommu/amd: remove set but not used variable 'tag'

2018-11-08 Thread Joerg Roedel
On Thu, Nov 08, 2018 at 06:12:40AM +, YueHaibing wrote: > - tag = event[1] & 0x03FF; > dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x > pasid=0x%05x address=0x%016llx flags=0x%04x]\n", > PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid)

Re: [PATCH -next] iommu/amd: remove set but not used variable 'tag'

2018-11-08 Thread YueHaibing
On 2018/11/8 17:32, Joerg Roedel wrote: > On Thu, Nov 08, 2018 at 06:12:40AM +, YueHaibing wrote: >> -tag = event[1] & 0x03FF; >> dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x >> pasid=0x%05x address=0x%016llx flags=0x%04x]\n", >> PCI_BUS_N

RE: [PATCH v2 1/2] iommu/ipmmu-vmsa: Hook up R8A774A1 DT maching code

2018-11-08 Thread Fabrizio Castro
Dear All, Who is the best person to take this patch? Thanks, Fab > From: Fabrizio Castro > Sent: 23 August 2018 16:33 > Subject: [PATCH v2 1/2] iommu/ipmmu-vmsa: Hook up R8A774A1 DT maching code > > Add support for RZ/G2M (R8A774A1) SoC IPMMUs. > > Signed-off-by: Fabrizio Castro > Reviewed-by:

RE: [PATCH 2/2] dt-bindings: iommu: ipmmu-vmsa: Add r8a774a1 support

2018-11-08 Thread Fabrizio Castro
Dear All, Who is the best person to take this patch? Thanks, Fab > From: Fabrizio Castro > Sent: 17 August 2018 15:31 > Subject: [PATCH 2/2] dt-bindings: iommu: ipmmu-vmsa: Add r8a774a1 support > > Document RZ/G2M (R8A774A1) SoC bindings. > > Signed-off-by: Fabrizio Castro > Reviewed-by: Biju

Re: [RFC] iommu/vt-d: Group and domain relationship

2018-11-08 Thread James Sewart via iommu
Hey, > On 8 Nov 2018, at 01:42, Lu Baolu wrote: > > Hi, > > On 11/8/18 1:55 AM, James Sewart wrote: >> Hey, >>> On 7 Nov 2018, at 02:10, Lu Baolu wrote: >>> >>> Hi, >>> >>> On 11/6/18 6:40 PM, James Sewart wrote: Hey Lu, Would you be able to go into more detail about the issues wit

[PATCH -next] iommu/amd: Add missed 'tag' to error msg in iommu_print_event

2018-11-08 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/iommu/amd_iommu.c: In function 'iommu_print_event': drivers/iommu/amd_iommu.c:550:33: warning: variable 'tag' set but not used [-Wunused-but-set-variable] It was introduced in e7f63ffc1bf1 ("iommu/amd: Update logging information for new ev

Re: [PATCH v2 1/2] iommu/ipmmu-vmsa: Hook up R8A774A1 DT maching code

2018-11-08 Thread Simon Horman
Hi Fabrizio, I believe this one is for Joerg. On Thu, Nov 08, 2018 at 11:22:55AM +, Fabrizio Castro wrote: > Dear All, > > Who is the best person to take this patch? > > Thanks, > Fab > > > From: Fabrizio Castro > > Sent: 23 August 2018 16:33 > > Subject: [PATCH v2 1/2] iommu/ipmmu-vmsa:

Re: [PATCH v2 1/2] iommu/ipmmu-vmsa: Hook up R8A774A1 DT maching code

2018-11-08 Thread Simon Horman
On Thu, Aug 23, 2018 at 04:33:04PM +0100, Fabrizio Castro wrote: > Add support for RZ/G2M (R8A774A1) SoC IPMMUs. > > Signed-off-by: Fabrizio Castro > Reviewed-by: Biju Das Reviewed-by: Simon Horman > --- > v1-v2: > * taken out IOMMU_OF_DECLARE > > drivers/iommu/ipmmu-vmsa.c | 4 > 1 fi

Re: [PATCH 2/2] dt-bindings: iommu: ipmmu-vmsa: Add r8a774a1 support

2018-11-08 Thread Simon Horman
On Fri, Aug 17, 2018 at 03:31:05PM +0100, Fabrizio Castro wrote: > Document RZ/G2M (R8A774A1) SoC bindings. > > Signed-off-by: Fabrizio Castro > Reviewed-by: Biju Das > --- > This patch applies on top of next-20180817 Reviewed-by: Simon Horman ___ i

Re: [PATCH 2/2] dt-bindings: iommu: ipmmu-vmsa: Add r8a774a1 support

2018-11-08 Thread Simon Horman
On Thu, Nov 08, 2018 at 11:23:58AM +, Fabrizio Castro wrote: > Dear All, > > Who is the best person to take this patch? I believe this one is also for Joerg. > Thanks, > Fab > > > From: Fabrizio Castro > > Sent: 17 August 2018 15:31 > > Subject: [PATCH 2/2] dt-bindings: iommu: ipmmu-vmsa:

Re: iommu/io-pgtable-arm-v7s: About pagetable 33bit PA

2018-11-08 Thread Robin Murphy
On 08/11/2018 07:31, Yong Wu wrote: Hi Robin, After the commit ad67f5a6545f ("arm64: replace ZONE_DMA with ZONE_DMA32"), we don't have ZONE_DMA in aarch64, but __arm_v7s_alloc_table[1] use the GFP_DMA to expect the physical address of pagetable should be 32bit. Right now we meet a issue that th

RE: [PATCH v2 1/2] iommu/ipmmu-vmsa: Hook up R8A774A1 DT maching code

2018-11-08 Thread Fabrizio Castro
Thank you Simon for getting back to me. Joerg, does this patch look ok to you? Thanks, Fab > Subject: Re: [PATCH v2 1/2] iommu/ipmmu-vmsa: Hook up R8A774A1 DT maching code > > Hi Fabrizio, > > I believe this one is for Joerg. > > On Thu, Nov 08, 2018 at 11:22:55AM +, Fabrizio Castro wrote: >

RE: [PATCH 2/2] dt-bindings: iommu: ipmmu-vmsa: Add r8a774a1 support

2018-11-08 Thread Fabrizio Castro
Thank you Simon for getting back to me. Joerg, does this patch look ok to you? Thanks, Fab > Subject: Re: [PATCH 2/2] dt-bindings: iommu: ipmmu-vmsa: Add r8a774a1 support > > On Thu, Nov 08, 2018 at 11:23:58AM +, Fabrizio Castro wrote: > > Dear All, > > > > Who is the best person to take thi

Re: [PATCH -next] iommu/amd: Add missed 'tag' to error msg in iommu_print_event

2018-11-08 Thread Joerg Roedel
On Thu, Nov 08, 2018 at 11:57:33AM +, YueHaibing wrote: > - dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x > pasid=0x%05x address=0x%016llx flags=0x%04x]\n", > + dev_err(dev, "INVALID_PPR_REQUEST device=%02x:%02x.%x > pasid=0x%05x address=0x%016llx flags=0x%04x

Re: [PATCH 2/2] dt-bindings: iommu: ipmmu-vmsa: Add r8a774a1 support

2018-11-08 Thread Joerg Roedel
On Thu, Nov 08, 2018 at 02:03:33PM +, Fabrizio Castro wrote: > Joerg, does this patch look ok to you? Applied both patches, thanks Fabrizio. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/io

Re: [PATCH v3 6/7] iommu/virtio: Add probe request

2018-11-08 Thread Auger Eric
Hi Jean-Philippe, On 10/12/18 4:59 PM, Jean-Philippe Brucker wrote: > 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 te

Re: [PATCH v3 5/7] iommu: Add virtio-iommu driver

2018-11-08 Thread Auger Eric
Hi Jean-Philippe, On 10/12/18 6:35 PM, Michael S. Tsirkin wrote: > On Fri, Oct 12, 2018 at 03:59:15PM +0100, Jean-Philippe Brucker wrote: >> The virtio IOMMU is a para-virtualized device, allowing to send IOMMU >> requests such as map/unmap over virtio transport without emulating page >> tables. T

Re: [PATCH v3 6/7] iommu/virtio: Add probe request

2018-11-08 Thread Jean-Philippe Brucker
On 08/11/2018 14:48, Auger Eric wrote: >> +struct virtio_iommu_probe_property { >> +__le16 type; >> +__le16 length; > the value[] field has disappeared but still is documented in the v0.8 spec. Good catch. I removed value[]

Re: [PATCH v3 5/7] iommu: Add virtio-iommu driver

2018-11-08 Thread Jean-Philippe Brucker
On 08/11/2018 14:51, Auger Eric wrote: >>> +/* >>> + * viommu_replay_mappings - re-send MAP requests >>> + * >>> + * When reattaching a domain that was previously detached from all >>> endpoints, >>> + * mappings were deleted from the device. Re-create the mappings available >>> in >>> + * the in

Patch "x86/swiotlb: Enable swiotlb for > 4GiG RAM on 32-bit kernels" has been added to the 4.18-stable tree

2018-11-08 Thread gregkh
This is a note to let you know that I've just added the patch titled x86/swiotlb: Enable swiotlb for > 4GiG RAM on 32-bit kernels to the 4.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is

[PATCH] iommu/dma: Use NUMA aware memory allocations in __iommu_dma_alloc_pages()

2018-11-08 Thread John Garry
Change function __iommu_dma_alloc_pages() to allocate memory/pages for DMA from respective device NUMA node. Originally-from: Ganapatrao Kulkarni Signed-off-by: John Garry --- This patch was originally posted by Ganapatrao in [1] *. However, after initial review, it was never reposted (due to

Re: [RFC PATCH 0/6] Auxiliary IOMMU domains and Arm SMMUv3

2018-11-08 Thread Jean-Philippe Brucker
Hi, On 06/11/2018 16:25, j...@8bytes.org wrote: > On Mon, Oct 22, 2018 at 12:50:56PM +0100, Robin Murphy wrote: >> To me, that sounds like a very good argument for having separate "attach as >> primary domain" and "attach as aux domain" APIs. > > I agree with that, overloading iommu_attach_device

Re: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-11-08 Thread Jean-Philippe Brucker
On 07/11/2018 04:53, Lu Baolu wrote: > Hi, > > On 10/20/18 2:11 AM, Jean-Philippe Brucker wrote: >> +static inline void *ioasid_find(struct ioasid_set *set, ioasid_t ioasid) >> +{ >> +return -ESRCH; > > return NULL; I'll fix it, thanks Jean ___ io

[PATCH 4.18 33/34] x86/swiotlb: Enable swiotlb for > 4GiG RAM on 32-bit kernels

2018-11-08 Thread Greg Kroah-Hartman
4.18-stable review patch. If anyone has any objections, please let me know. -- From: Christoph Hellwig commit 485734f3fc77c1eb77ffe138c027b9a4bf0178f3 upstream. We already build the swiotlb code for 32-bit kernels with PAE support, but the code to actually use swiotlb has only

Re: [PATCH v4 04/12] iommu/vt-d: Add 256-bit invalidation descriptor support

2018-11-08 Thread Lu Baolu
Hi, On 11/8/18 3:20 PM, Liu, Yi L wrote: Hi, From: Lu Baolu [mailto:baolu...@linux.intel.com] Sent: Thursday, November 8, 2018 2:14 PM Hi, On 11/8/18 1:45 PM, Liu, Yi L wrote: From: Lu Baolu [mailto:baolu...@linux.intel.com] Sent: Thursday, November 8, 2018 1:25 PM Subject: Re: [PATCH v4 04

RE: [PATCH v4 04/12] iommu/vt-d: Add 256-bit invalidation descriptor support

2018-11-08 Thread Liu, Yi L
Hi, > From: Lu Baolu [mailto:baolu...@linux.intel.com] > Sent: Friday, November 9, 2018 9:40 AM > Subject: Re: [PATCH v4 04/12] iommu/vt-d: Add 256-bit invalidation descriptor > support > > Hi, > > On 11/8/18 3:20 PM, Liu, Yi L wrote: > > Hi, > > > >> From: Lu Baolu [mailto:baolu...@linux.intel.

RE: [RFC] iommu/vt-d: Group and domain relationship

2018-11-08 Thread Liu, Yi L
Hi James, Regards to the relationship of iommu group and domain, the blog written by Alex may help you. The blog explained very well on how iommu group is determined and why. http://vfio.blogspot.com/2014/08/iommu-groups-inside-and-out.html > From: iommu-boun...@lists.linux-foundation.org [mailt

Re: [PATCH] iommu/dma: Zero pages manually in a length of scatterlist

2018-11-08 Thread Christoph Hellwig
On Tue, Nov 06, 2018 at 02:39:26PM +, Robin Murphy wrote: > ...and I have some significant objections to that simplification which I > plan to respond with ;) > > (namely that it defaults the whole higher-order page allocation business > which will have varying degrees of performance impact on

Re: [PATCH 06/10] swiotlb: use swiotlb_map_page in swiotlb_map_sg_attrs

2018-11-08 Thread Christoph Hellwig
On Tue, Nov 06, 2018 at 05:27:14PM -0800, John Stultz wrote: > But at that point if I just re-apply "swiotlb: use swiotlb_map_page in > swiotlb_map_sg_attrs", I reproduce the hangs. > > Any suggestions for how to further debug what might be going wrong > would be appreciated! Very odd. In the en

Re: iommu/io-pgtable-arm-v7s: About pagetable 33bit PA

2018-11-08 Thread Yong Wu
On Thu, 2018-11-08 at 13:49 +, Robin Murphy wrote: > On 08/11/2018 07:31, Yong Wu wrote: > > Hi Robin, > > > > After the commit ad67f5a6545f ("arm64: replace ZONE_DMA with > > ZONE_DMA32"), we don't have ZONE_DMA in aarch64, but > > __arm_v7s_alloc_table[1] use the GFP_DMA to expect the physic

Re: [PATCH 9/9] csky: use the generic remapping dma alloc implementation

2018-11-08 Thread Christoph Hellwig
On Tue, Nov 06, 2018 at 03:01:41PM +0800, Guo Ren wrote: > > + return dma_atomic_pool_init(GFP_KERNEL, pgprot_noncached(PAGE_KERNEL)); > > } > > postcore_initcall(atomic_pool_init); > Seems also could remove atomic_pool_init from csky, why not put them in > common? The code basically moved to

Re: move the arm arch_dma_alloc implementation to common code

2018-11-08 Thread Christoph Hellwig
Can I get a quick review from the arm64 folks? I think it should be fine there as it basically is a code move, but an additional pair or two of eyes always helps to weed out bugs. On Mon, Nov 05, 2018 at 01:19:22PM +0100, Christoph Hellwig wrote: > Hi all, > > this series moves the existing arm6