RE: [v3 24/26] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked

2015-03-05 Thread Wu, Feng
> -Original Message- > From: Marcelo Tosatti [mailto:mtosa...@redhat.com] > Sent: Wednesday, March 04, 2015 8:06 PM > To: Wu, Feng > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com; x...@kernel.org; > g...@kernel.org; pbonz...@redhat.com; dw...@infradead.org; > j...@8bytes.org; a

Re: [PATCH] iommu: arm-smmu: set a more appropriate DMA mask

2015-03-05 Thread Mitchel Humpherys
On Thu, Mar 05 2015 at 10:56:36 AM, Robin Murphy wrote: > Since we use dma_map_page() as an architecture-independent means of > making page table updates visible to non-coherent SMMUs, we need to > have a suitable DMA mask set to discourage the DMA mapping layer from > creating bounce buffers and

Re: [PATCH v5 0/4] vfio: type1: support for ARM SMMUS with VFIO_IOMMU_TYPE1

2015-03-05 Thread Alex Williamson
On Thu, 2015-03-05 at 18:34 +0100, Eric Auger wrote: > Hi All, > > Ironically, since the correction of the IOMMU_CAP_CACHE_COHERENCY bug > (https://lkml.org/lkml/2015/1/29/514) in vfio_iommu_type1.c, my Calxeda > Midway VFIO use case is not working anymore. This is also observable > when I do not

[PATCH] iommu: arm-smmu: set a more appropriate DMA mask

2015-03-05 Thread Robin Murphy
Since we use dma_map_page() as an architecture-independent means of making page table updates visible to non-coherent SMMUs, we need to have a suitable DMA mask set to discourage the DMA mapping layer from creating bounce buffers and flushing those instead, if said page tables happen to lie outside

Re: [PATCH] iommu/arm-smmu: fix leak in arm_smmu_flush_pgtable

2015-03-05 Thread Robin Murphy
On 05/03/15 17:28, Mitchel Humpherys wrote: On Thu, Mar 05 2015 at 02:38:45 AM, Robin Murphy wrote: Hi Mitch, On 05/03/15 00:18, Mitchel Humpherys wrote: We're currently mapping a page in arm_smmu_flush_pgtable without ever unmapping it. Fix this by calling dma_unmap_page on the returned dma

Re: [PATCH v5 0/4] vfio: type1: support for ARM SMMUS with VFIO_IOMMU_TYPE1

2015-03-05 Thread Will Deacon
On Thu, Mar 05, 2015 at 05:54:26PM +, Alex Williamson wrote: > On Thu, 2015-03-05 at 18:34 +0100, Eric Auger wrote: > > Ironically, since the correction of the IOMMU_CAP_CACHE_COHERENCY bug > > (https://lkml.org/lkml/2015/1/29/514) in vfio_iommu_type1.c, my Calxeda > > Midway VFIO use case is n

Re: [PATCH v5 0/4] vfio: type1: support for ARM SMMUS with VFIO_IOMMU_TYPE1

2015-03-05 Thread Alex Williamson
On Thu, 2015-03-05 at 18:34 +0100, Eric Auger wrote: > Hi All, > > Ironically, since the correction of the IOMMU_CAP_CACHE_COHERENCY bug > (https://lkml.org/lkml/2015/1/29/514) in vfio_iommu_type1.c, my Calxeda > Midway VFIO use case is not working anymore. This is also observable > when I do not

Re: [PATCH v5 0/4] vfio: type1: support for ARM SMMUS with VFIO_IOMMU_TYPE1

2015-03-05 Thread Eric Auger
Hi All, Ironically, since the correction of the IOMMU_CAP_CACHE_COHERENCY bug (https://lkml.org/lkml/2015/1/29/514) in vfio_iommu_type1.c, my Calxeda Midway VFIO use case is not working anymore. This is also observable when I do not apply at all the whole [PATCH v5 0/4] vfio: type1: support for AR

Re: [PATCH] iommu/arm-smmu: fix leak in arm_smmu_flush_pgtable

2015-03-05 Thread Will Deacon
On Thu, Mar 05, 2015 at 05:28:02PM +, Mitchel Humpherys wrote: > On Thu, Mar 05 2015 at 02:38:45 AM, Robin Murphy wrote: > > On 05/03/15 00:18, Mitchel Humpherys wrote: > >> We're currently mapping a page in arm_smmu_flush_pgtable without ever > >> unmapping it. Fix this by calling dma_unmap_

Re: [PATCH] iommu/arm-smmu: fix leak in arm_smmu_flush_pgtable

2015-03-05 Thread Mitchel Humpherys
On Thu, Mar 05 2015 at 02:38:45 AM, Robin Murphy wrote: > Hi Mitch, > > On 05/03/15 00:18, Mitchel Humpherys wrote: >> We're currently mapping a page in arm_smmu_flush_pgtable without ever >> unmapping it. Fix this by calling dma_unmap_page on the returned dma >> address. Since the only reason w

Re: [RFC PATCH 0/5] arm64: IOMMU-backed DMA mapping

2015-03-05 Thread Robin Murphy
Hi Marek, On 05/03/15 14:31, Marek Szyprowski wrote: Hello, On 2015-01-12 21:48, Robin Murphy wrote: Hi all, Whilst it's a long way off perfect, this has reached the point of being functional and stable enough to be useful, so here it is. The core consists of the meat of the arch/arm implemen

Re: [RFC PATCH 4/5] arm64: add IOMMU dma_ops

2015-03-05 Thread Marek Szyprowski
Hello, On 2015-01-12 21:48, Robin Murphy wrote: Taking some inspiration from the arch/arm code, implement the arch-specific side of the DMA mapping ops using the new IOMMU-DMA layer. Signed-off-by: Robin Murphy --- arch/arm64/include/asm/device.h | 3 + arch/arm64/include/asm/dma-map

Re: [RFC PATCH 0/5] arm64: IOMMU-backed DMA mapping

2015-03-05 Thread Marek Szyprowski
Hello, On 2015-01-12 21:48, Robin Murphy wrote: Hi all, Whilst it's a long way off perfect, this has reached the point of being functional and stable enough to be useful, so here it is. The core consists of the meat of the arch/arm implementation modified to remove the assumption of PAGE_SIZE p

Re: [RFC PATCH v2 2/3] arm64: add IOMMU dma_ops

2015-03-05 Thread Robin Murphy
Hi Laura, On 05/03/15 00:19, Laura Abbott wrote: [...] Consider that the IOMMU's page table walker is a DMA master in its own right, and that is the device you're mapping the page tables for. Therefore your IOMMU driver needs to have access to the struct device of the IOMMU itself to use for th

Re: [PATCH] iommu/arm-smmu: fix leak in arm_smmu_flush_pgtable

2015-03-05 Thread Robin Murphy
Hi Mitch, On 05/03/15 00:18, Mitchel Humpherys wrote: We're currently mapping a page in arm_smmu_flush_pgtable without ever unmapping it. Fix this by calling dma_unmap_page on the returned dma address. Since the only reason we're calling dma_map_page is to make sure it actually gets flushed ou

Re: [PATCH v5 0/4] vfio: type1: support for ARM SMMUS with VFIO_IOMMU_TYPE1

2015-03-05 Thread Baptiste Reynal
On Wed, Mar 4, 2015 at 6:45 PM, Alex Williamson wrote: > On Wed, 2015-03-04 at 17:07 +0100, Baptiste Reynal wrote: >> This patch series makes the VFIO_IOMMU_TYPE1 driver buildable on ARM, so it >> may be used with ARM SMMUs. It also adds support for the IOMMU_NOEXEC flag >> supported by SMMUs adhe