mbox

[Resend,pull,request,SRU,Zesty] Support SMMU passthrough using the default domain

Message ID 1495248054.26034.9@smtp.canonical.com
State New
Headers show

Pull-request

git+ssh://git.launchpad.net/~centriq-team/+git/linux-sru lp1688158

Message

Manoj Iyer May 20, 2017, 2:40 a.m. UTC
Paolo found build issues with the patch series I had sent earlier and 
nak'ed it because of build failure. Rather than sending large number of 
patches with git send-email I am resending these as a pull-request (I 
should have done this initially).

I am resending the patch series to add  support for SMMU passthrough 
using the default domain, the patch series implements a kernel 
command-line option iommu.passthrough=0/1 1 - Bypass the IOMMU for DMA, 
0 - Use IOMMU translation for DMA. This feature  is desired on both 
Qualcomm Centriq 2400 and Thunder-X platforms.

The bug report http://bugs.launchpad.net/bugs/1688158 has detailed test 
results from Qualcomm demonstrating performance improvements using 
passthrough. I  have  also tested the kernel on Thundex-X for any 
regressions, for both boot test and  pci passthrough.

I builtsuccessfully the kernel in the centriq ppa with patches applied 
to zesty master for ARM64, AMD64 and i386.
https://launchpad.net/~centriq-team/+archive/ubuntu/sru/+packages

Please consider this patch series for review and SRU to zesty.

The following changes since commit 
6e2b676684d740b6c781cf631453127f3f4d7631:

  UBUNTU: Ubuntu-4.10.0-21.23 (2017-04-28 12:46:22 +0200)

are available in the git repository at:

  git+ssh://git.launchpad.net/~centriq-team/+git/linux-sru lp1688158

for you to fetch changes up to ac9d3fd2c6f4a7d7bd0d3329ac073eca1961f8e5:

  arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA 
(2017-05-19 14:40:57 -0500)

----------------------------------------------------------------
Joerg Roedel (7):
      iommu: Rename iommu_get_instance()
      iommu: Rename struct iommu_device
      iommu: Introduce new 'struct iommu_device'
      iommu: Add sysfs bindings for struct iommu_device
      iommu: Make iommu_device_link/unlink take a struct iommu_device
      iommu: Add iommu_device_set_fwnode() interface
      iommu/arm-smmu: Make use of the iommu_register interface

Will Deacon (6):
      iommu/arm-smmu: Restrict domain attributes to UNMANAGED domains
      iommu/arm-smmu: Install bypass S2CRs for IOMMU_DOMAIN_IDENTITY 
domains
      iommu/arm-smmu-v3: Make arm_smmu_install_ste_for_dev return void
      iommu/arm-smmu-v3: Install bypass STEs for IOMMU_DOMAIN_IDENTITY 
domains
      iommu: Allow default domain type to be set on the kernel command 
line
      arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA

 Documentation/admin-guide/kernel-parameters.txt |  6 ++
 arch/arm64/mm/dma-mapping.c                     | 17 +++--
 drivers/acpi/arm64/iort.c                       |  2 +-
 drivers/iommu/amd_iommu.c                       | 18 +++--
 drivers/iommu/amd_iommu_init.c                  |  9 ++-
 drivers/iommu/amd_iommu_types.h                 |  4 +-
 drivers/iommu/arm-smmu-v3.c                     | 98 
+++++++++++++++++--------
 drivers/iommu/arm-smmu.c                        | 56 +++++++++++++-
 drivers/iommu/dmar.c                            | 20 +++--
 drivers/iommu/intel-iommu.c                     | 21 +++---
 drivers/iommu/iommu-sysfs.c                     | 61 +++++++--------
 drivers/iommu/iommu.c                           | 61 ++++++++++++---
 include/linux/intel-iommu.h                     |  3 +-
 include/linux/iommu.h                           | 78 
++++++++++++++++----
 include/linux/of_iommu.h                        |  2 +-
 15 files changed, 327 insertions(+), 129 deletions(-)

Comments

Stefan Bader May 23, 2017, 9 a.m. UTC | #1
On 20.05.2017 04:40, Manoj Iyer wrote:
> Paolo found build issues with the patch series I had sent earlier and nak'ed it
> because of build failure. Rather than sending large number of patches with git
> send-email I am resending these as a pull-request (I should have done this
> initially). 
> 
> I am resending the patch series to add  support for SMMU passthrough using the
> default domain, the patch series implements a kernel command-line option
> iommu.passthrough=0/1 1 - Bypass the IOMMU for DMA, 0 - Use IOMMU translation
> for DMA. This feature  is desired on both Qualcomm Centriq 2400 and Thunder-X
> platforms.
> 
> The bug report http://bugs.launchpad.net/bugs/1688158 has detailed test
> results from Qualcomm demonstrating performance improvements using passthrough.
> I  have  also tested the kernel on Thundex-X for any regressions, for both boot
> test and  pci passthrough.
> 
> I builtsuccessfully the kernel in the centriq ppa with patches applied to zesty
> master for ARM64, AMD64 and i386. 
> https://launchpad.net/~centriq-team/+archive/ubuntu/sru/+packages
> 
> Please consider this patch series for review and SRU to zesty.
> 
> The following changes since commit 6e2b676684d740b6c781cf631453127f3f4d7631:
> 
>   UBUNTU: Ubuntu-4.10.0-21.23 (2017-04-28 12:46:22 +0200)
> 
> are available in the git repository at:
> 
>   git+ssh://git.launchpad.net/~centriq-team/+git/linux-sru lp1688158
> 
> for you to fetch changes up to ac9d3fd2c6f4a7d7bd0d3329ac073eca1961f8e5:
> 
>   arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA (2017-05-19
> 14:40:57 -0500)
> 
> ----------------------------------------------------------------
> Joerg Roedel (7):
>       iommu: Rename iommu_get_instance()
>       iommu: Rename struct iommu_device
>       iommu: Introduce new 'struct iommu_device'
>       iommu: Add sysfs bindings for struct iommu_device
>       iommu: Make iommu_device_link/unlink take a struct iommu_device
>       iommu: Add iommu_device_set_fwnode() interface

This, again, contains changes in the area of IOMMU that are not isolated to
arm64 systems (specifically iommu_amd and iommu_intel) while regression testing
I can see only was done for arm64.

I cannot ACK this under this conditions.

-Stefan

>       iommu/arm-smmu: Make use of the iommu_register interface
> 
> Will Deacon (6):
>       iommu/arm-smmu: Restrict domain attributes to UNMANAGED domains
>       iommu/arm-smmu: Install bypass S2CRs for IOMMU_DOMAIN_IDENTITY domains
>       iommu/arm-smmu-v3: Make arm_smmu_install_ste_for_dev return void
>       iommu/arm-smmu-v3: Install bypass STEs for IOMMU_DOMAIN_IDENTITY domains
>       iommu: Allow default domain type to be set on the kernel command line
>       arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA
> 
>  Documentation/admin-guide/kernel-parameters.txt |  6 ++
>  arch/arm64/mm/dma-mapping.c                     | 17 +++--
>  drivers/acpi/arm64/iort.c                       |  2 +-
>  drivers/iommu/amd_iommu.c                       | 18 +++--
>  drivers/iommu/amd_iommu_init.c                  |  9 ++-
>  drivers/iommu/amd_iommu_types.h                 |  4 +-
>  drivers/iommu/arm-smmu-v3.c                     | 98 +++++++++++++++++--------
>  drivers/iommu/arm-smmu.c                        | 56 +++++++++++++-
>  drivers/iommu/dmar.c                            | 20 +++--
>  drivers/iommu/intel-iommu.c                     | 21 +++---
>  drivers/iommu/iommu-sysfs.c                     | 61 +++++++--------
>  drivers/iommu/iommu.c                           | 61 ++++++++++++---
>  include/linux/intel-iommu.h                     |  3 +-
>  include/linux/iommu.h                           | 78 ++++++++++++++++----
>  include/linux/of_iommu.h                        |  2 +-
>  15 files changed, 327 insertions(+), 129 deletions(-)
> 
> 
>
Stefan Bader June 6, 2017, 6:07 p.m. UTC | #2
Ok, seems to have gotten some testing on amd64 at least. Also now all upstream
(as of v4.12-rc1). But again, as with the other iommu update, this should be
carefully observed with any io bound testing.

-Stefan
Seth Forshee June 8, 2017, 1 p.m. UTC | #3
On Fri, May 19, 2017 at 09:40:54PM -0500, Manoj Iyer wrote:
> Paolo found build issues with the patch series I had sent earlier and nak'ed
> it because of build failure. Rather than sending large number of patches
> with git send-email I am resending these as a pull-request (I should have
> done this initially).
> 
> I am resending the patch series to add  support for SMMU passthrough using
> the default domain, the patch series implements a kernel command-line option
> iommu.passthrough=0/1 1 - Bypass the IOMMU for DMA, 0 - Use IOMMU
> translation for DMA. This feature  is desired on both Qualcomm Centriq 2400
> and Thunder-X platforms.
> 
> The bug report http://bugs.launchpad.net/bugs/1688158 has detailed test
> results from Qualcomm demonstrating performance improvements using
> passthrough. I  have  also tested the kernel on Thundex-X for any
> regressions, for both boot test and  pci passthrough.
> 
> I builtsuccessfully the kernel in the centriq ppa with patches applied to
> zesty master for ARM64, AMD64 and i386.
> https://launchpad.net/~centriq-team/+archive/ubuntu/sru/+packages
> 
> Please consider this patch series for review and SRU to zesty.
> 
> The following changes since commit 6e2b676684d740b6c781cf631453127f3f4d7631:
> 
>  UBUNTU: Ubuntu-4.10.0-21.23 (2017-04-28 12:46:22 +0200)
> 
> are available in the git repository at:
> 
>  git+ssh://git.launchpad.net/~centriq-team/+git/linux-sru lp1688158
> 
> for you to fetch changes up to ac9d3fd2c6f4a7d7bd0d3329ac073eca1961f8e5:
> 
>  arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA (2017-05-19
> 14:40:57 -0500)

Applied the following patches from 4.12 to artful/master-next:

iommu/arm-smmu: Restrict domain attributes to UNMANAGED domains
iommu/arm-smmu: Install bypass S2CRs for IOMMU_DOMAIN_IDENTITY domains
iommu/arm-smmu-v3: Make arm_smmu_install_ste_for_dev return void
iommu/arm-smmu-v3: Install bypass STEs for IOMMU_DOMAIN_IDENTITY domains
iommu: Allow default domain type to be set on the kernel command line