Re: [PATCH v2] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-04-24 Thread Catalin Marinas
Hi Geert, On Fri, Apr 21, 2017 at 07:39:43PM +0200, Geert Uytterhoeven wrote: > On Fri, Apr 21, 2017 at 7:32 PM, Catalin Marinas > wrote: > > On Fri, Mar 31, 2017 at 01:02:51PM +0200, Andrzej Hajda wrote: > >> In case of DMA_ATTR_FORCE_CONTIGUOUS allocations

Re: [PATCH] iommu/arm-smmu-v3: Increase SMMU CMD queue poll timeout

2017-04-24 Thread Will Deacon
On Mon, Apr 24, 2017 at 10:26:53PM +0530, Sunil Kovvuri wrote: > On Mon, Apr 24, 2017 at 9:38 PM, Will Deacon wrote: > > On Mon, Apr 24, 2017 at 05:29:36PM +0530, Geetha sowjanya wrote: > >> From: Geetha > >> > >> When large memory is being unmapped, huge

Re: [PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-04-24 Thread Laura Abbott
On 04/21/2017 09:12 AM, Catalin Marinas wrote: > On Wed, Mar 29, 2017 at 01:55:32PM +0100, Robin Murphy wrote: >> On 29/03/17 11:05, Andrzej Hajda wrote: >>> In case of DMA_ATTR_FORCE_CONTIGUOUS allocations vm_area->pages >>> is invalid. __iommu_mmap_attrs and __iommu_get_sgtable cannot use >>>

Re: [PATCH] iommu/arm-smmu-v3: Increase SMMU CMD queue poll timeout

2017-04-24 Thread Sunil Kovvuri
On Mon, Apr 24, 2017 at 9:38 PM, Will Deacon wrote: > On Mon, Apr 24, 2017 at 05:29:36PM +0530, Geetha sowjanya wrote: >> From: Geetha >> >> When large memory is being unmapped, huge no of tlb invalidation cmds are >> submitted followed by a SYNC command.

Re: [PATCH] iommu/arm-smmu-v3: Increase SMMU CMD queue poll timeout

2017-04-24 Thread Akula, Geethasowjanya
>>On Mon, Apr 24, 2017 at 05:29:36PM +0530, Geetha sowjanya wrote: >> From: Geetha >> >> When large memory is being unmapped, huge no of tlb invalidation cmds are >> submitted followed by a SYNC command. This sometimes hits CMD queue full and >> poll on queue drain is being

Re: [PATCH] iommu/arm-smmu: Return IOVA in iova_to_phys when SMMU is bypassed

2017-04-24 Thread Sunil Kovvuri
On Mon, Apr 24, 2017 at 9:30 PM, Will Deacon wrote: > On Mon, Apr 24, 2017 at 09:23:16PM +0530, Sunil Kovvuri wrote: >> On Mon, Apr 24, 2017 at 8:14 PM, Will Deacon wrote: >> > On Mon, Apr 17, 2017 at 05:27:26PM +0530, sunil.kovv...@gmail.com wrote: >>

Re: [PATCH v5 09/32] x86/mm: Provide general kernel support for memory encryption

2017-04-24 Thread Tom Lendacky
On 4/24/2017 10:57 AM, Dave Hansen wrote: On 04/24/2017 08:53 AM, Tom Lendacky wrote: On 4/21/2017 4:52 PM, Dave Hansen wrote: On 04/18/2017 02:17 PM, Tom Lendacky wrote: @@ -55,7 +57,7 @@ static inline void copy_user_page(void *to, void *from, unsigned long vaddr,

Re: [PATCH] iommu/arm-smmu-v3: Increase SMMU CMD queue poll timeout

2017-04-24 Thread Will Deacon
On Mon, Apr 24, 2017 at 05:29:36PM +0530, Geetha sowjanya wrote: > From: Geetha > > When large memory is being unmapped, huge no of tlb invalidation cmds are > submitted followed by a SYNC command. This sometimes hits CMD queue full and > poll on queue drain is being timedout

Re: [PATCH] iommu/arm-smmu: Return IOVA in iova_to_phys when SMMU is bypassed

2017-04-24 Thread Will Deacon
On Mon, Apr 24, 2017 at 09:23:16PM +0530, Sunil Kovvuri wrote: > On Mon, Apr 24, 2017 at 8:14 PM, Will Deacon wrote: > > On Mon, Apr 17, 2017 at 05:27:26PM +0530, sunil.kovv...@gmail.com wrote: > >> From: Sunil Goutham > >> > >> For software initiated

Re: [PATCH v5 09/32] x86/mm: Provide general kernel support for memory encryption

2017-04-24 Thread Dave Hansen
On 04/24/2017 08:53 AM, Tom Lendacky wrote: > On 4/21/2017 4:52 PM, Dave Hansen wrote: >> On 04/18/2017 02:17 PM, Tom Lendacky wrote: >>> @@ -55,7 +57,7 @@ static inline void copy_user_page(void *to, void >>> *from, unsigned long vaddr, >>> __phys_addr_symbol(__phys_reloc_hide((unsigned

Re: [PATCH] iommu: arm-smmu: correct sid to mask

2017-04-24 Thread Will Deacon
On Fri, Apr 21, 2017 at 05:03:36PM +0800, Peng Fan wrote: > From code "SMR mask 0x%x out of range for SMMU", > so, we need to use mask, not sid. > > Signed-off-by: Peng Fan > Cc: Will Deacon > Cc: Robin Murphy > --- >

Re: [PATCH v5 09/32] x86/mm: Provide general kernel support for memory encryption

2017-04-24 Thread Tom Lendacky
On 4/21/2017 4:52 PM, Dave Hansen wrote: On 04/18/2017 02:17 PM, Tom Lendacky wrote: @@ -55,7 +57,7 @@ static inline void copy_user_page(void *to, void *from, unsigned long vaddr, __phys_addr_symbol(__phys_reloc_hide((unsigned long)(x))) #ifndef __va -#define __va(x)

Re: [PATCH] iommu/arm-smmu: Return IOVA in iova_to_phys when SMMU is bypassed

2017-04-24 Thread Sunil Kovvuri
On Mon, Apr 24, 2017 at 8:14 PM, Will Deacon wrote: > On Mon, Apr 17, 2017 at 05:27:26PM +0530, sunil.kovv...@gmail.com wrote: >> From: Sunil Goutham >> >> For software initiated address translation, when domain type is >> IOMMU_DOMAIN_IDENTITY i.e SMMU

Re: [RFC 3/3] virtio-iommu: future work

2017-04-24 Thread Jean-Philippe Brucker
On 21/04/17 09:31, Tian, Kevin wrote: >> From: Jean-Philippe Brucker >> Sent: Saturday, April 8, 2017 3:18 AM >> >> Here I propose a few ideas for extensions and optimizations. This is all >> very exploratory, feel free to correct mistakes and suggest more things. > > [...] >> >> II. Page table

Re: [RFC 2/3] virtio-iommu: device probing and operations

2017-04-24 Thread Jean-Philippe Brucker
On 21/04/17 10:02, Tian, Kevin wrote: >> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] >> Sent: Wednesday, April 19, 2017 2:46 AM >> >> On 18/04/17 11:26, Tian, Kevin wrote: From: Jean-Philippe Brucker Sent: Saturday, April 8, 2017 3:18 AM >>> [...] II.

Re: [RFC 1/3] virtio-iommu: firmware description of the virtual topology

2017-04-24 Thread Jean-Philippe Brucker
On 21/04/17 09:43, Tian, Kevin wrote: >> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] >> Sent: Wednesday, April 19, 2017 2:41 AM >> >> On 18/04/17 10:51, Tian, Kevin wrote: From: Jean-Philippe Brucker Sent: Saturday, April 8, 2017 3:18 AM Unlike other

Re: [PATCH] iommu/arm-smmu: Return IOVA in iova_to_phys when SMMU is bypassed

2017-04-24 Thread Will Deacon
On Mon, Apr 17, 2017 at 05:27:26PM +0530, sunil.kovv...@gmail.com wrote: > From: Sunil Goutham > > For software initiated address translation, when domain type is > IOMMU_DOMAIN_IDENTITY i.e SMMU is bypassed, mimic HW behavior > i.e return the same IOVA as translated

Re: [RFC PATH] of/pci/dma: fix DMA configruation for PCI masters

2017-04-24 Thread Rob Herring
On Sat, Apr 22, 2017 at 3:08 AM, Oza Pawandeep wrote: > current device frmework and of framework integration assumes dma-ranges > in a way where memory-mapped devices define their dma-ranges. > dma-ranges: (child-bus-address, parent-bus-address, length). > > but iproc based

[PATCH] iommu/arm-smmu-v3: Increase SMMU CMD queue poll timeout

2017-04-24 Thread Geetha sowjanya
From: Geetha When large memory is being unmapped, huge no of tlb invalidation cmds are submitted followed by a SYNC command. This sometimes hits CMD queue full and poll on queue drain is being timedout throwing error message 'CMD_SYNC timeout'. Although there is no functional

Re: [PATCH 1/1] iommu/amd: fix incorrect error handling

2017-04-24 Thread Joerg Roedel
On Sun, Apr 23, 2017 at 06:23:21PM +0800, Pan Bian wrote: > From: Pan Bian > > In function amd_iommu_bind_pasid(), the control flow jumps to label > out_free when pasid_state->mm and mm is NULL. And mmput(mm) is called. > In function mmput(mm), mm is referenced without