All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Generic IOMMU page table framework
@ 2014-11-27 11:51 ` Will Deacon
  0 siblings, 0 replies; 76+ messages in thread
From: Will Deacon @ 2014-11-27 11:51 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
  Cc: Will Deacon, laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw,
	Varun.Sethi-KZfg59tc24xl57MIdRCFDg,
	prem.mallappa-dY08KVG/lbpWk0Htik3J/w, Robin.Murphy-5wv7dgnIgG8

Hi all,

This series introduces a generic IOMMU page table allocation framework,
implements support for ARM long-descriptors and then ports the arm-smmu
driver over to the new code.

There are a few reasons for doing this:

  - Page table code is hard, and I don't enjoy shopping

  - A number of IOMMUs actually use the same table format, but currently
    duplicate the code

  - It provides a CPU (and architecture) independent allocator, which
    may be useful for some systems where the CPU is using a different
    table format for its own mappings

As illustrated in the final patch, an IOMMU driver interacts with the
allocator by passing in a configuration structure describing the
input and output address ranges, the supported pages sizes and a set of
ops for performing various TLB invalidation and PTE flushing routines.

The LPAE code implements support for 4k/2M/1G, 16k/32M and 64k/512M
mappings, but I decided not to implement the contiguous bit in the
interest of trying to keep the code semi-readable. This could always be
added later, if needed.

I also included some self-tests for the LPAE implementation. Ideally
we'd merge these, but I'm also happy to drop them if there are
objections.

Tested with the self-tests, but also VFIO + MMU-500 at stage-1 and
stage-2. Patches taken against my iommu/devel branch (queued by Joerg
for 3.19).

All feedback welcome.

Will

--->8

Will Deacon (4):
  iommu: introduce generic page table allocation framework
  iommu: add ARM LPAE page table allocator
  iommu: add self-consistency tests to ARM LPAE IO page table allocator
  iommu/arm-smmu: make use of generic LPAE allocator

 MAINTAINERS                    |   1 +
 arch/arm64/Kconfig             |   1 -
 drivers/iommu/Kconfig          |  32 +-
 drivers/iommu/Makefile         |   2 +
 drivers/iommu/arm-smmu.c       | 872 +++++++++++---------------------------
 drivers/iommu/io-pgtable-arm.c | 925 +++++++++++++++++++++++++++++++++++++++++
 drivers/iommu/io-pgtable.c     |  78 ++++
 drivers/iommu/io-pgtable.h     |  77 ++++
 8 files changed, 1361 insertions(+), 627 deletions(-)
 create mode 100644 drivers/iommu/io-pgtable-arm.c
 create mode 100644 drivers/iommu/io-pgtable.c
 create mode 100644 drivers/iommu/io-pgtable.h

-- 
2.1.1

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

end of thread, other threads:[~2014-12-15 17:46 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-27 11:51 [PATCH 0/4] Generic IOMMU page table framework Will Deacon
2014-11-27 11:51 ` Will Deacon
     [not found] ` <1417089078-22900-1-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org>
2014-11-27 11:51   ` [PATCH 1/4] iommu: introduce generic page table allocation framework Will Deacon
2014-11-27 11:51     ` Will Deacon
     [not found]     ` <1417089078-22900-2-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org>
2014-11-30 22:00       ` Laurent Pinchart
2014-11-30 22:00         ` Laurent Pinchart
2014-12-01 12:13         ` Will Deacon
2014-12-01 12:13           ` Will Deacon
     [not found]           ` <20141201121338.GD18466-5wv7dgnIgG8@public.gmane.org>
2014-12-01 13:33             ` Laurent Pinchart
2014-12-01 13:33               ` Laurent Pinchart
2014-12-01 13:53               ` Will Deacon
2014-12-01 13:53                 ` Will Deacon
2014-12-14 23:46       ` Laurent Pinchart
2014-12-14 23:46         ` Laurent Pinchart
2014-12-15  9:45         ` Will Deacon
2014-12-15  9:45           ` Will Deacon
2014-11-27 11:51   ` [PATCH 2/4] iommu: add ARM LPAE page table allocator Will Deacon
2014-11-27 11:51     ` Will Deacon
     [not found]     ` <1417089078-22900-3-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org>
2014-11-30 23:29       ` Laurent Pinchart
2014-11-30 23:29         ` Laurent Pinchart
2014-12-01 17:23         ` Will Deacon
2014-12-01 17:23           ` Will Deacon
     [not found]           ` <20141201172315.GI18466-5wv7dgnIgG8@public.gmane.org>
2014-12-01 20:21             ` Laurent Pinchart
2014-12-01 20:21               ` Laurent Pinchart
2014-12-02  9:41               ` Will Deacon
2014-12-02  9:41                 ` Will Deacon
     [not found]                 ` <20141202094156.GB9917-5wv7dgnIgG8@public.gmane.org>
2014-12-02 11:47                   ` Laurent Pinchart
2014-12-02 11:47                     ` Laurent Pinchart
2014-12-05 18:48                     ` Will Deacon
2014-12-05 18:48                       ` Will Deacon
2014-12-02 22:41       ` Mitchel Humpherys
2014-12-02 22:41         ` Mitchel Humpherys
     [not found]         ` <vnkw8uipznbj.fsf-Yf+dfxj6toJBVvN7MMdr1KRtKmQZhJ7pQQ4Iyu8u01E@public.gmane.org>
2014-12-03 11:11           ` Will Deacon
2014-12-03 11:11             ` Will Deacon
2014-12-05 10:55       ` Varun Sethi
2014-12-05 10:55         ` Varun Sethi
     [not found]         ` <BN3PR0301MB12198CE5D736CDC6A221EDC2EA790-CEkquS/Gb81uuip9JPHoc5wN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2014-12-05 18:48           ` Will Deacon
2014-12-05 18:48             ` Will Deacon
     [not found]             ` <20141205184802.GH1203-5wv7dgnIgG8@public.gmane.org>
2014-12-14 17:45               ` Varun Sethi
2014-12-14 17:45                 ` Varun Sethi
     [not found]                 ` <BN3PR0301MB1219D3161E4E9DB314FDD8FAEA6E0-CEkquS/Gb81uuip9JPHoc5wN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2014-12-15 13:30                   ` Will Deacon
2014-12-15 13:30                     ` Will Deacon
     [not found]                     ` <20141215133020.GJ20738-5wv7dgnIgG8@public.gmane.org>
2014-12-15 15:43                       ` Will Deacon
2014-12-15 15:43                         ` Will Deacon
2014-12-15 16:35                         ` Varun Sethi
2014-12-15 16:35                           ` Varun Sethi
     [not found]                           ` <BN3PR0301MB12194A8F5CFF870B7A124623EA6F0-CEkquS/Gb81uuip9JPHoc5wN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2014-12-15 17:25                             ` Will Deacon
2014-12-15 17:25                               ` Will Deacon
2014-12-15 16:43                       ` Varun Sethi
2014-12-15 16:43                         ` Varun Sethi
     [not found]                         ` <BN3PR0301MB12199C5CAD33E745CC7E51F4EA6F0-CEkquS/Gb81uuip9JPHoc5wN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2014-12-15 17:20                           ` Will Deacon
2014-12-15 17:20                             ` Will Deacon
2014-11-27 11:51   ` [PATCH 3/4] iommu: add self-consistency tests to ARM LPAE IO " Will Deacon
2014-11-27 11:51     ` Will Deacon
2014-11-27 11:51   ` [PATCH 4/4] iommu/arm-smmu: make use of generic LPAE allocator Will Deacon
2014-11-27 11:51     ` Will Deacon
2014-11-30 22:03   ` [PATCH 0/4] Generic IOMMU page table framework Laurent Pinchart
2014-11-30 22:03     ` Laurent Pinchart
2014-12-01 12:05     ` Will Deacon
2014-12-01 12:05       ` Will Deacon
     [not found]       ` <20141201120534.GC18466-5wv7dgnIgG8@public.gmane.org>
2014-12-02 13:47         ` Laurent Pinchart
2014-12-02 13:47           ` Laurent Pinchart
2014-12-02 13:53           ` Will Deacon
2014-12-02 13:53             ` Will Deacon
     [not found]             ` <20141202135356.GF9917-5wv7dgnIgG8@public.gmane.org>
2014-12-02 22:29               ` Laurent Pinchart
2014-12-02 22:29                 ` Laurent Pinchart
2014-12-14 23:49   ` Laurent Pinchart
2014-12-14 23:49     ` Laurent Pinchart
2014-12-15 16:10     ` Will Deacon
2014-12-15 16:10       ` Will Deacon
     [not found]       ` <20141215161052.GM20738-5wv7dgnIgG8@public.gmane.org>
2014-12-15 17:33         ` Laurent Pinchart
2014-12-15 17:33           ` Laurent Pinchart
2014-12-15 17:39           ` Will Deacon
2014-12-15 17:39             ` Will Deacon
     [not found]             ` <20141215173911.GT20738-5wv7dgnIgG8@public.gmane.org>
2014-12-15 17:46               ` Laurent Pinchart
2014-12-15 17:46                 ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.