Re: [RFC PATCH 0/4] Use 1st-level for DMA remapping in guest

2019-09-23 Thread Lu Baolu
Hi, On 9/24/19 4:25 AM, Raj, Ashok wrote: Hi Jacob On Mon, Sep 23, 2019 at 12:27:15PM -0700, Jacob Pan wrote: In VT-d 3.0, scalable mode is introduced, which offers two level translation page tables and nested translation mode. Regards to GIOVA support, it can be simplified by 1) moving the

Re: [RFC PATCH 0/4] Use 1st-level for DMA remapping in guest

2019-09-23 Thread Lu Baolu
Hi Jacob, On 9/24/19 3:27 AM, Jacob Pan wrote: Hi Baolu, On Mon, 23 Sep 2019 20:24:50 +0800 Lu Baolu wrote: This patchset aims to move IOVA (I/O Virtual Address) translation to 1st-level page table under scalable mode. The major purpose of this effort is to make guest IOVA support more

Re: [RFC PATCH 2/4] iommu/vt-d: Add first level page table interfaces

2019-09-23 Thread Lu Baolu
Hi Ashok, On 9/24/19 4:31 AM, Raj, Ashok wrote: On Mon, Sep 23, 2019 at 08:24:52PM +0800, Lu Baolu wrote: This adds functions to manipulate first level page tables which could be used by a scalale mode capable IOMMU unit. s/scalale/scalable Yes. intel_mmmap_range(domain, addr, end,

Re: [RFC PATCH 2/4] iommu/vt-d: Add first level page table interfaces

2019-09-23 Thread Raj, Ashok
On Mon, Sep 23, 2019 at 08:24:52PM +0800, Lu Baolu wrote: > This adds functions to manipulate first level page tables > which could be used by a scalale mode capable IOMMU unit. s/scalale/scalable > > intel_mmmap_range(domain, addr, end, phys_addr, prot) Maybe think of a different name..?

Re: [RFC PATCH 0/4] Use 1st-level for DMA remapping in guest

2019-09-23 Thread Jacob Pan
Hi Baolu, On Mon, 23 Sep 2019 20:24:50 +0800 Lu Baolu wrote: > This patchset aims to move IOVA (I/O Virtual Address) translation > to 1st-level page table under scalable mode. The major purpose of > this effort is to make guest IOVA support more efficient. > > As Intel VT-d architecture offers

[PATCH trivial 3/3] treewide: arch: Fix Kconfig indentation

2019-09-23 Thread Krzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^/\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski --- arch/Kconfig | 4 ++-- arch/alpha/Kconfig | 2 +-

[PATCH trivial 2/3] treewide: Fix Kconfig indentation

2019-09-23 Thread Krzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^/\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski --- certs/Kconfig | 14 ++--- init/Kconfig | 28 +-

[PATCH trivial 1/3] treewide: drivers: Fix Kconfig indentation

2019-09-23 Thread Krzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^/\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski --- drivers/acpi/Kconfig | 8 +- drivers/ata/Kconfig | 12 +--

Re: [RFC PATCH 1/3] dma-mapping: make overriding GFP_* flags arch customizable

2019-09-23 Thread Christoph Hellwig
On Mon, Sep 23, 2019 at 02:34:16PM +0200, Halil Pasic wrote: > Before commit 57bf5a8963f8 ("dma-mapping: clear harmful GFP_* flags in > common code") tweaking the client code supplied GFP_* flags used to be > an issue handled in the architecture specific code. The commit message > suggests, that

[RFC PATCH 2/3] s390/virtio: fix virtio-ccw DMA without PV

2019-09-23 Thread Halil Pasic
Commit 37db8985b211 ("s390/cio: add basic protected virtualization support") breaks virtio-ccw devices with VIRTIO_F_IOMMU_PLATFORM for non Protected Virtualization (PV) guests. The problem is that the dma_mask of the ccw device, which is used by virtio core, gets changed from 64 to 31 bit,

[RFC PATCH 0/3] fix dma_mask for CCW devices

2019-09-23 Thread Halil Pasic
Commit 37db8985b211 ("s390/cio: add basic protected virtualization support") breaks virtio-ccw devices with VIRTIO_F_IOMMU_PLATFORM for non Protected Virtualization (PV) guests. The problem is that the dma_mask of the CCW device, which is used by virtio core, gets changed from 64 to 31 bit. This

[RFC PATCH 3/3] dma-mapping: warn on harmful GFP_* flags

2019-09-23 Thread Halil Pasic
The commit message of commit 57bf5a8963f8 ("dma-mapping: clear harmful GFP_* flags in common code") says that probably warn when we encounter harmful GFP_* flags which we clean -- because the client code is best case silly if not buggy. I concur with that. Let's warn once when we encounter silly

[RFC PATCH 1/3] dma-mapping: make overriding GFP_* flags arch customizable

2019-09-23 Thread Halil Pasic
Before commit 57bf5a8963f8 ("dma-mapping: clear harmful GFP_* flags in common code") tweaking the client code supplied GFP_* flags used to be an issue handled in the architecture specific code. The commit message suggests, that fixing the client code would actually be a better way of dealing with

[RFC PATCH 3/4] iommu/vt-d: Map/unmap domain with mmmap/mmunmap

2019-09-23 Thread Lu Baolu
If a dmar domain has DOMAIN_FLAG_FIRST_LEVEL_TRANS bit set in its flags, IOMMU will use the first level page table for translation. Hence, we need to map or unmap addresses in the first level page table. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Cc: Yi Sun Signed-off-by: Lu

[RFC PATCH 4/4] iommu/vt-d: Identify domains using first level page table

2019-09-23 Thread Lu Baolu
This checks whether a domain should use first level page table for map/unmap. And if so, we should attach the domain to the device in first level translation mode. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Cc: Yi Sun Cc: Sanjay Kumar Signed-off-by: Lu Baolu ---

[RFC PATCH 0/4] Use 1st-level for DMA remapping in guest

2019-09-23 Thread Lu Baolu
This patchset aims to move IOVA (I/O Virtual Address) translation to 1st-level page table under scalable mode. The major purpose of this effort is to make guest IOVA support more efficient. As Intel VT-d architecture offers caching-mode, guest IOVA (GIOVA) support is now implemented in a shadow

[RFC PATCH 1/4] iommu/vt-d: Move domain_flush_cache helper into header

2019-09-23 Thread Lu Baolu
So that it could be used in other source files as well. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Cc: Yi Sun Signed-off-by: Lu Baolu --- drivers/iommu/intel-iommu.c | 7 --- include/linux/intel-iommu.h | 7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff

[RFC PATCH 2/4] iommu/vt-d: Add first level page table interfaces

2019-09-23 Thread Lu Baolu
This adds functions to manipulate first level page tables which could be used by a scalale mode capable IOMMU unit. intel_mmmap_range(domain, addr, end, phys_addr, prot) - Map an iova range of [addr, end) to the physical memory started at @phys_addr with the @prot permissions.

Re: [PATCH 0/3] iommu/io-pgtable-arm: Mali LPAE improvements

2019-09-23 Thread Tomeu Vizoso
On Thu, 19 Sep 2019 at 10:31, Will Deacon wrote: > > On Wed, Sep 11, 2019 at 06:19:40PM +0100, Robin Murphy wrote: > > On 2019-09-11 5:20 pm, Will Deacon wrote: > > > On Wed, Sep 11, 2019 at 06:19:04PM +0200, Neil Armstrong wrote: > > > > On 11/09/2019 16:42, Robin Murphy wrote: > > > > > Here's