public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/22 v2] Introduce default domains for iommu groups
@ 2015-05-28 16:41 Joerg Roedel
  2015-05-28 16:41 ` [PATCH 01/22] iommu: Remove function name from pr_fmt() Joerg Roedel
                   ` (22 more replies)
  0 siblings, 23 replies; 35+ messages in thread
From: Joerg Roedel @ 2015-05-28 16:41 UTC (permalink / raw)
  To: iommu
  Cc: Will Deacon, Kukjin Kim, David Woodhouse, Heiko Stuebner,
	Hiroshi Doyu, Thierry Reding, Alex Williamson, Robin Murphy,
	Laurent Pinchart, Oded Gabbay, joro, jroedel, linux-kernel

Hi,

here is the second version of my patch-set to introduce
default domains into the iommu core. This time it has a lot
more patches, mostly because I added a proof of concept
implementation by converting the AMD IOMMU driver to make
use of it.

Converting the first driver to the new concept triggered a
lot of changes and extensions in the patch-set to fit all
the needs of a more complex iommu driver. Converting other
drivers might need further changes, but that is something
for the future.

A major change is that now the default domain has to be
allocated by the code that allocates the iommu group. For
PCI devices this happens in the IOMMU core, but drivers
allocating the group on their own can now implement a policy
that fits their needs (e.g. not allocate one domain per
group but let multiple groups share one domain).

The new core code is changed in a way to stay compatible
with the old behavior. All IOMMU drivers that are not yet
converted to default domains should behave as without this
patch-set.

I tested the patches on AMD systems with IOMMUv1 and
IOMMUv2, did boot-testing and also successfully tested
device assignment. I did the same tests on an Intel VT-d
machine to make sure the changes do not introduce
regressions on unconverted drivers.

If you prefer a git branch for testing, please look here:

	git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux.git iommu-default-domains

Any feedback and further testing welcome!

Thanks,

	Joerg


Joerg Roedel (22):
  iommu: Remove function name from pr_fmt()
  iommu: Add a few printk messages to group handling code
  iommu: Propagate error in add_iommu_group
  iommu: Clean up after a failed bus initialization
  iommu: Call remove_device call-back after driver release
  iommu: Allocate a default domain for iommu groups
  iommu: Limit iommu_attach/detach_device to devices with their own
    group
  iommu: Make sure a device is always attached to a domain
  iommu: Add iommu_get_domain_for_dev function
  iommu: Introduce direct mapped region handling
  iommu: Create direct mappings in default domains
  iommu: Add function to query the default domain of a group
  iommu: Introduce iommu_request_dm_for_dev()
  iommu/amd: Implement dm_region call-backs
  iommu/amd: Use default domain if available for DMA-API
  iommu/amd: Implement add_device and remove_device
  iommu/amd: Support IOMMU_DOMAIN_DMA type allocation
  iommu/amd: Support IOMMU_DOMAIN_IDENTITY type allocation
  iommu/amd: Put IOMMUv2 devices in a direct mapped domain
  iommu/amd: Get rid of device_dma_ops_init()
  iommu/amd: Remove unused fields from struct dma_ops_domain
  iommu/amd: Propagate errors from amd_iommu_init_api

 drivers/iommu/amd_iommu.c       | 568 ++++++++++++----------------------------
 drivers/iommu/amd_iommu_init.c  |  34 +--
 drivers/iommu/amd_iommu_proto.h |   2 +-
 drivers/iommu/amd_iommu_types.h |  11 -
 drivers/iommu/iommu.c           | 369 ++++++++++++++++++++++++--
 include/linux/iommu.h           |  44 ++++
 6 files changed, 562 insertions(+), 466 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2015-06-29 19:55 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-28 16:41 [PATCH 00/22 v2] Introduce default domains for iommu groups Joerg Roedel
2015-05-28 16:41 ` [PATCH 01/22] iommu: Remove function name from pr_fmt() Joerg Roedel
2015-05-28 16:41 ` [PATCH 02/22] iommu: Add a few printk messages to group handling code Joerg Roedel
2015-05-28 16:41 ` [PATCH 03/22] iommu: Propagate error in add_iommu_group Joerg Roedel
2015-06-29  9:28   ` Heiko Stübner
2015-06-29  9:37     ` Joerg Roedel
2015-06-29 14:06     ` Joerg Roedel
2015-06-29 19:55       ` Heiko Stübner
2015-05-28 16:41 ` [PATCH 04/22] iommu: Clean up after a failed bus initialization Joerg Roedel
2015-05-28 16:41 ` [PATCH 05/22] iommu: Call remove_device call-back after driver release Joerg Roedel
2015-05-28 16:41 ` [PATCH 06/22] iommu: Allocate a default domain for iommu groups Joerg Roedel
2015-06-11 17:33   ` Robin Murphy
2015-06-11 17:33   ` Robin Murphy
2015-05-28 16:41 ` [PATCH 07/22] iommu: Limit iommu_attach/detach_device to devices with their own group Joerg Roedel
2015-05-28 16:41 ` [PATCH 08/22] iommu: Make sure a device is always attached to a domain Joerg Roedel
2015-06-11 17:41   ` Robin Murphy
2015-05-28 16:41 ` [PATCH 09/22] iommu: Add iommu_get_domain_for_dev function Joerg Roedel
2015-05-28 16:41 ` [PATCH 10/22] iommu: Introduce direct mapped region handling Joerg Roedel
2015-06-05 14:17   ` Will Deacon
2015-06-05 14:32     ` jroedel
2015-06-11 19:22   ` Robin Murphy
2015-05-28 16:41 ` [PATCH 11/22] iommu: Create direct mappings in default domains Joerg Roedel
2015-05-28 16:41 ` [PATCH 12/22] iommu: Add function to query the default domain of a group Joerg Roedel
2015-05-28 16:41 ` [PATCH 13/22] iommu: Introduce iommu_request_dm_for_dev() Joerg Roedel
2015-05-28 16:41 ` [PATCH 14/22] iommu/amd: Implement dm_region call-backs Joerg Roedel
2015-05-28 16:41 ` [PATCH 15/22] iommu/amd: Use default domain if available for DMA-API Joerg Roedel
2015-05-28 16:41 ` [PATCH 16/22] iommu/amd: Implement add_device and remove_device Joerg Roedel
2015-05-28 16:41 ` [PATCH 17/22] iommu/amd: Support IOMMU_DOMAIN_DMA type allocation Joerg Roedel
2015-05-28 16:41 ` [PATCH 18/22] iommu/amd: Support IOMMU_DOMAIN_IDENTITY " Joerg Roedel
2015-05-28 16:41 ` [PATCH 19/22] iommu/amd: Put IOMMUv2 devices in a direct mapped domain Joerg Roedel
2015-05-28 16:41 ` [PATCH 20/22] iommu/amd: Get rid of device_dma_ops_init() Joerg Roedel
2015-05-28 16:41 ` [PATCH 21/22] iommu/amd: Remove unused fields from struct dma_ops_domain Joerg Roedel
2015-05-28 16:41 ` [PATCH 22/22] iommu/amd: Propagate errors from amd_iommu_init_api Joerg Roedel
2015-06-05 14:22 ` [PATCH 00/22 v2] Introduce default domains for iommu groups Will Deacon
2015-06-05 14:35   ` jroedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox