Re: [PATCH v2 1/2] iommu/dma: Add support for DMA_ATTR_FORCE_CONTIGUOUS

2017-01-31 Thread Geert Uytterhoeven
Hi Robin, On Fri, Jan 27, 2017 at 6:50 PM, Robin Murphy wrote: > On 27/01/17 15:34, Geert Uytterhoeven wrote: >> Add helpers for allocating physically contiguous DMA buffers to the >> generic IOMMU DMA code. This can be useful when two or more devices >> with different memory requirements are in

[PATCH v3] arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU

2017-01-31 Thread Geert Uytterhoeven
Add support for allocating physically contiguous DMA buffers on arm64 systems with an IOMMU. This can be useful when two or more devices with different memory requirements are involved in buffer sharing. Note that as this uses the CMA allocator, setting the DMA_ATTR_FORCE_CONTIGUOUS attribute has

[PATCH v2] iommu/ipmmu-vmsa: Restrict IOMMU Domain Geometry to 32-bit address space

2017-01-31 Thread Geert Uytterhoeven
Currently, the IPMMU/VMSA driver supports 32-bit I/O Virtual Addresses only, and thus sets io_pgtable_cfg.ias = 32. However, it doesn't force a 32-bit IOVA space through the IOMMU Domain Geometry. Hence if a device (e.g. SYS-DMAC) rightfully configures a 40-bit DMA mask, it will still be handed o

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

2017-01-31 Thread Joerg Roedel
On Mon, Jan 30, 2017 at 09:39:52AM -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 side errors. > > To: Joerg Roed

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

2017-01-31 Thread Joerg Roedel
On Mon, Jan 30, 2017 at 07:11:11PM -0800, David Dillow wrote: > Fixes: 3269ee0bd668 ("intel-iommu: Fix leaks in pagetable freeing") > Reviewed-by: Benjamin Serebrin > Signed-off-by: David Dillow > --- > drivers/iommu/intel-iommu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied,

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

2017-01-31 Thread Sricharan
Hi Robin, >> I gave the whole patch set a try on ThunderX. really_probe() is failing >> on dma_configure()->of_pci_iommu_init() for each PCI device. > > When you say "failing", do you mean cleanly, or with a crash? I've > managed to hit __of_match_node() dereferencing NULL from